introduce a factor variable with the months and then use tapply? Kjetil
On Sun, Nov 1, 2009 at 9:07 PM, Tim Bean <timb...@gmail.com> wrote: > Hello, I have a quick question about time series methodology. If I want to > display a boxplot of time series data, sorted by period, I can type: > > boxplot(data ~ cycle(data)); > > where data is of class "ts" > > Is there a similar method for calculating, say, the median value of each > time step within the series? (So for a monthly data set, calculate median > for all Januarys, all Februarys, all Marchs, etc.) > > Thanks, > Tim > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > ______________________________________________ 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.