Adding r code for big table