# NOT RUN {
data(aosat)
# }
# NOT RUN {
library(zoo)
z = zoo(aosat[,2], order.by=aosat[,1])
plot(z)
## yearly
plot(aggregate(z, floor(index(z)), mean))
## decade-long means
plot(aggregate(z, 10*floor(index(z)/10), mean))
# }
Run the code above in your browser using DataLab