data(ha)
#Convert to S4 object
shp <- system.file("shapes/berlin.shp",package="surveillance")
has4 <- aggregate(disProg2sts(ha,map=readShapePoly(shp,IDvar="SNAME")),nfreq=13)
#A suite of of simple tests (inspired by the Matrix package)
stopifnot(identical(has4, has4[]))
plot(has4[, 3]) # Single series
plot(has4[1:30, 3]) # Somewhat shorter
#Counts at time 20
plot(has4[20, ],type = observed ~1 |unit)
Run the code above in your browser using DataLab