sample.coalescents | R Documentation |
Draw waiting times for all compartments that have two or more extant lineages.
sample.coalescents(run, current.time)
run: |
an R6 object of class Run' |
current.time: |
current simulation time for inner tree |
Named numeric vector of waiting times per extant compartment
# this model specifies 10 compartments with 3 lineages each,
# and constant coalescent rate 1.0
path <- system.file('extdata', 'SI.yaml', package='twt')
settings <- yaml.load_file(path)
mod <- Model$new(settings)
run <- Run$new(mod)
# these should average 0.333
sample.coalescents(run, 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.