data("imdepi")
load(system.file("shapes", "districtsD.RData", package="surveillance"))
## convert imdepi point pattern into multivariate time series
imdepi_sts <- epidataCS2sts(imdepi, freq=12, start=c(2002,1),
neighbourhood=NULL, # not needed here
tiles=districtsD)
## compare plots of monthly number of cases
opar <- par(mfrow=c(2,1))
plot(imdepi, "time", t0.Date=as.Date("2002-01-01"), breaks="months")
plot(imdepi_sts, type=observed~time, legend.opts=NULL)
par(opar)
## plot number of cases by district
plot(imdepi_sts, type=observed~1|unit, labels=FALSE)
Run the code above in your browser using DataLab