Hello I have a time series (with index of type chron) and I need to calculate the cummax(mydata)-mydata on every day separately. I've tried this aggregate(mydata, as.date, cummax) but aggregate can only produce a single scalar result for each subset instead of a vector.
I've tried with tapply and lapply but I don't know how to do it. Can anyone help me, plese cheers -- View this message in context: http://r.789695.n4.nabble.com/aggregate-with-cummax-tp2331991p2331991.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.