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.
- Using tapply()
R1tapply(df$dt, df$group, summary)
R1ddply(df, .(group), summarise, mean=mean(dt), sum=sum(dt))