#Load O104 outbreak data
data("husO104Hosp")
#Convert line list to an sts object
sts <- linelist2sts(husO104Hosp, dateCol="dHosp", aggregate.by="1 day")
#Check that the number of cases is correct
all.equal(sum(observed(sts)),nrow(husO104Hosp))
#Plot the result
plot(sts,xaxis.tickFreq=list("%d"=atChange,"%m"=atChange),
xaxis.labelFreq=list("%d"=at2ndChange),
xaxis.labelFormat="%d %b",
xlab="",las=2,cex.axis=0.8)
Run the code above in your browser using DataLab