In R I frequently aggregate daily data (in a zoo) by month, using something like this:
zoo
result <- aggregate(x, as.yearmon, "mean", na.rm=TRUE)
Is there a way that I can do this by week?