coal_to_tree: Generate tree from coalescence times

View source: R/simTrees.R

coal_to_treeR 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)


cloneRate documentation built on Sept. 22, 2023, 5:09 p.m.