I have a raster time series created as a zoo onbect. I am able to aggregate quarterly means but I want the aggregates from December-February,March-May,June-August and September to Novermber. How can I make this possible please? Normal R code is:
library(raster)
library(zoo)
C <- raster(nrows=30, ncols=30)
C[] <- 1:ncell(C)
O <- raster(nrows=30, ncols=30)
O[] <- 1:ncell(O)
CO1 <- stack(C,C,C,C,O,O,O)
m <- seq(as.Date('2009-12-15'), as.Date('2010-06-15'), 'month')
CO2 <- setZ(CO1,m)
CN <- zApply(CO2, by=as.yearqtr, fun=mean)
This would yield a quarterly mean for December,January-March and April-June. What I want is a mean for Dec-Feb, Mar-May,June.