I have a dataframe like this:
block plot date data
1 1 aug 11.95171507
1 1 aug 18.41451063
1 2 aug 9.506155236
1 2 aug 13.26259947
1 3 aug 17.53616835
1 3 sep 15.40950767
2 1 sep 23.03616678
2 1 sep 17.07067258
2 2 sep 11.58278798
2 2 sep 13.15443304
I would like to calculate the means of data across plot based on block and date. Eventually, i would like to have 5 means.
Thanks for your help.
Probably the path of least resistance is to use
plyr:You can do similar things with
data.table,aggregate,byand probably a whole host of other functions. Take a few minutes to peruse the R tag here on SO.