plot.Run | R Documentation |
S3 plot method for Run objects.
## S3 method for class 'Run'
plot(run, type = "t", ...)
run: |
R6 object of class 'Run' |
type: |
what type of plot should be drawn. Possible types are
|
If the Run object is the outcome of sim.outer.tree() or either of the related outer tree functions, then we call the internal function .plot.outer.tree().
If the Run object is the outcome of sim.inner.tree(), then the eventlog is converted into a Phylo object and plotted using the S3 method provided by the 'ape' package.
# load model
path <- system.file('extdata', 'SI.yaml', package='twt')
# load file and parse to construct MODEL object
settings <- yaml.load_file(path)
mod <- Model$new(settings)
# simulate outer tree
run <- sim.outer.tree(mod)
# generate plots side-by-side
par(mfrow=c(1,2))
plot(run, type='s') # population dynamics
plot(run, type='t') # transmission tree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.