data("measlesWeserEms")
## sequential plot of the counts by region in weeks 12-16 only (for speed)
if (require("animation")) {
oldwd <- setwd(tempdir()) # to not clutter up the current working dir
saveHTML(animate(measlesWeserEms, tps=12:16, timeplot=FALSE),
title="Evolution of the measles epidemic in the Weser-Ems region",
ani.width=500, ani.height=600)
setwd(oldwd)
}
Run the code above in your browser using DataLab