# Load the data
data("campyDE")
# O104 period is W21-W30 in 2011
stopifnot(all(campyDE$O104period == (
(campyDE$date >= as.Date("2011-05-23")) &
(campyDE$date < as.Date("2011-07-31"))
)))
# Make an sts object from the data.frame
cam.sts <- sts(epoch=campyDE$date, observed=campyDE$case, state=campyDE$state)
# Plot the result
plot(cam.sts)
Run the code above in your browser using DataLab