coal_to_tree {cloneRate} | R Documentation |
Generate tree from coalescence times
Description
generates a tree from a vector of coalescence times by randomly merging lineages.
Usage
coal_to_tree(coal_times)
Arguments
coal_times |
A numeric vector of coalescence times |
Value
An ape object of class "phylo" representing the ultrametric phylogenetic tree with edge lengths in units of time.
Examples
# Generate an ape phylo tree with n tips from a vector of n-1 coalescence times
randomCoalTimes <- c(9.3, 7.8, 10.15, 11.23, 9.4, 8.8, 10.01, 13)
tree <- coal_to_tree(randomCoalTimes)
[Package cloneRate version 0.2.3 Index]