Hello,

How do i achieve an operation like group by in R.Is there any package or inbuilt function which helps to implement this SQL methodology.

Hello,

How do i achieve an operation like group by in R.Is there any package or inbuilt function which helps to implement this SQL methodology.

Hi,

Yeah dplyr has a group_by functions. Also you can use SQL codes in R, using Sqldf package! (Apart from outer joins it supports all SQL functionalities)

Hope this helps.

Regards,

Aayush

R has a very good package called plyr for various data manipulations. It’s function ddply can be used for the above purpose as follows:

http://www.inside-r.org/packages/cran/plyr/docs/ddply

For bigger datasets, data.table has faster operations. It’s implementation can be found here: