# NOT RUN {
## Simulate an outbreak of 200 individuals over 20 time steps ##
set.seed(3)
x <- simuEpi(N = 200, D = 20, beta = 0.002, nu = 0.1, mu = 0.002)
## x is a list:
class(x)
names(x)
## x$dynamics contains demographic info
x$dynamics
## x$plot is a ggplot object
class(x$plot)
x$plot
## x$x is the obkData object
summary(x$x)
plotIndividualTimeline(x$x, colorBy="DateInfected")
## Same, with a phylogenetic tree
x <- simuEpi(N = 200, D = 20, beta = 0.002, nu = 0.1, mu = 0.002,
plot=TRUE, makePhyloTree=TRUE)
plotggphy(x$x, ladderize=TRUE, show.tip=TRUE,
branch.unit="year", tip.label.size=4)
# }
Run the code above in your browser using DataLab