#Load simulated outbreak data.
url <- paste("http://www.stat.uni-muenchen.de/~hoehle/",
"teaching/moid2011/tutorials/cast-backnow/outbreak.txt",sep="")
D <- try(read.table(url,header=TRUE,colClasses=c("integer",rep("Date",3))))
if (!inherits(D, "try-error")) {
#Convert line list to an sts object
sts <- linelist2sts(D, dateCol="dOnset", aggregate.by="1 day")
#Plot the result
plot(sts,xaxis.years=FALSE,legend.opts=NULL,xlab="time (days)")
}
Run the code above in your browser using DataLab