sim.inner.tree | R Documentation |
Simulate the coalescence of Lineages within Compartments, and resolve migration events that may involve sampled Lineages.
sim.inner.tree(run)
run: |
R6 object of class Run. The Run object tracks the locations of Lineage objects among Compartments that are modified by transmission and migration; and tracks the presence/absence of Lineages that change with sampling, coalescence and bottleneck events. |
R6 object of class EventLogger
# 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 - returns a Run object carrying EventLogger
run <- sim.outer.tree(mod)
# simulate inner tree
tree <- sim.inner.tree(run)
plot(tree) # converts to a Phylo object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.