I've got a timeseries object defined like so:
tser <- ts(cumsum(1 + rnorm(48)), frequency = 12, start = c(2010, 1))
The data looks similar to the below (clipped to only show one year)
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2010 0.6055677 2.8650543 2.6115597 3.1496051 2.6611612 4.4993758 6.0717509 6.9426434 7.1386547 7.1653957 8.2570628 7.8585075
I would like to roll this data up into quarterly data. So I'd only see one value for each quarter.
is there a recommend way of doing this other than walking through each month and aggregating myself?
Use
aggregate.ts
withsum
,mean
or whatever summary function desired. See?aggregate.ts