Description Usage Arguments Value Examples
Sample one or more transmission trees uniformly
1 2 3 4 5 6 7 8 |
generator |
A list of class |
count |
How many transmission trees to sample. |
unsampled |
The number of unsampled hosts in the transmission chain. |
draw |
Use |
igraph |
Produce the transmission trees in |
verbose |
Verbose output |
A list, each of whose elements is a list of class tt
with one or more of the following elements:
annotations
Always present. A vector indicating which host (given by numbers corresponding to the ordering in generator$hosts
) is assigned to each phylogeny node.
edgelist
Always present. A data.frame
giving the edge list; the first column are parents and the second children.
hidden
Present if unsampled
is greater than 0. The number of "hidden" unsampled hosts (with no associated nodes) along each branch.
picture
Present if draw
was TRUE; a ggtree
object.
igraph
Present if igraph
was TRUE; an igraph
object.
1 2 3 4 5 6 7 8 9 10 11 12 | # draw one sample from the uniform distribution
generator <- tt.generator(stratus.example.tree)
samples <- sample.tt(generator, 1, draw = TRUE)
samples[[1]]
# with unsampled.hosts
generator.us <- tt.generator(stratus.example.tree, max.unsampled = 2)
# note that you can ask for less unsampled hosts than the generator has (but not more)
samples.1us <- sample.tt(generator.us, 1, unsampled = 1, draw = TRUE)
samples.1us[[1]]
# with multiply sampled hosts
generator.ms <- tt.generator(stratus.example.tree, tip.map = grouping.map)
samples.ms <- sample.tt(generator.ms, 1, draw = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.