I have a data frame with 3 variables: place, time, and value (P, T, X). I want to create a fourth variable which will be the cumulative sum of X. Normally I like to do group
I hope i understood what you want:
library(plyr) ddply(df, .(P,T), summarize, cumsum(X))
does this help you?