data(measlesDE)
plot(measlesDE)
## aggregate to bi-weekly intervals
measles2w <- aggregate(measlesDE, nfreq = 26)
plot(measles2w, type = observed ~ time)
## use a date index for nicer x-axis plotting
epoch(measles2w) <- seq(as.Date("2005-01-03"), by = "2 weeks",
length.out = nrow(measles2w))
plot(measles2w, type = observed ~ time)
Run the code above in your browser using DataLab