attach.tree: attach.tree

View source: R/simOuterTree.R

attach.treeR Documentation

attach.tree

Description

attach.tree converts a Newick tree string or ape::phylo object into a sequence of transmission events that are stored as an eventlog object, bypassing outer tree simulation

Usage

attach.tree(tree, model)

Arguments

tree:

either a Newick tree string or an object of class 'phylo' (ape) that represents the transmission tree (history). Internal node labels must be present to indicate transmission sources.

model:

an R6 model of class Model. The Model should provide the parameters of a CompartmentType and sampled Compartments. Currently only one CompartmentType is supported by this method, until we can devise a procedure for the user to assign unsampled Compartments at internal nodes to different CompartmentTypes.

Value

An object of class Model

See Also

sim.outer.tree, load.outer.tree DEPRECATED

Examples

e <- attach.tree('(((A:1,B:1)B:1,C:1)C:1,D:1)D:1;')
e  # print contents



PoonLab/twt documentation built on Nov. 7, 2024, 4:18 a.m.