Lineage | R Documentation |
Lineage
is an R6 class for objects that represent pathogen lineages
that are carried by Compartments and which comprise the "inner" tree of the
simulation.
new()
Lineage$new(name = NA, type = NA, sampling.time = NA, location = NA)
copy()
Lineage$copy(deep = FALSE)
get.name()
Lineage$get.name()
get.type()
Lineage$get.type()
get.sampling.time()
Lineage$get.sampling.time()
get.location()
Lineage$get.location()
set.location()
Lineage$set.location(comp)
set.location.by.name()
Lineage$set.location.by.name(locationList, new.locationName)
clone()
The objects of this class are cloneable with this method.
Lineage$clone(deep = FALSE)
deep
Whether to make a deep clone.
# load Compartments from a YAML object
path <- system.file('extdata', 'SI.yaml', package='twt')
settings <- yaml.load_file(path)
mod <- MODEL$new(settings)
# display first Lineage in first Compartment
comp <- mod$get.compartments()[[1]]
comp$get.lineages() # display all 3 lineages
# manually add an unsampled Lineage
lin <- Lineage$new(name="L0", location=comp)
comp$add.lineage(lin)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.