Skip to content
Prev 319953 / 398502 Next

summarize dataframe based on multiple cols, not their combinations

Will this do?

library(plyr)
  
  ddply(my_df, .(a), summarize, mm = mean(dat), number = length(dat))

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!