Data Aggregation (Grouping & Summarizing) in R

A data frame or table has several columns as conditions and the rest as results, now I want to summary the table by the same conditions. That means, the results columns of the rows with same conditions will be added together.

  1. Using tapply()
  2. Using plyr package

     

 

Reference:

http://stackoverflow.com/questions/9847054/how-to-get-summary-statistics-by-group

http://www.sr.bham.ac.uk/~ajrs/R/r-show_data.html

http://www.psychwire.co.uk/2011/04/aggregate-function-in-r-making-your-life-easier-one-mean-at-a-time/

http://www.psychwire.co.uk/2011/04/data-aggregation-in-r-plyr-sqldf-and-data-table/

Leave a Reply

Your email address will not be published. Required fields are marked *