getCladeHeight: Height of a clade in a phylogenetic tree

Description Usage Arguments Value Warning

View source: R/tree_utils.R

Description

Function that returns the height of the clade defined by the tips in tips. If the input tree is a single phylogenetic tree of class "phylo" the height of the clade is returned as a single number. If the input is a "multiPhylo" object then the distribution of heights across all trees is returned. If as.mcmc is true the distribution is returned as an "mcmc" object (mcmc).

Usage

1
getCladeHeight(trees, tips, as.mcmc = TRUE)

Arguments

trees

A single tree of class "phylo" or a set of trees of class "multiPhylo"

tips

A vector of tips in the tree(s). Could either be numeric (tip numbers) or a character vector (taxon names).

as.mcmc

Return the distribution as an object of class "mcmc" (mcmc). (only has an effect if trees is of class "multiPhylo").

Value

A numeric vector of heights or an "mcmc" object containing the heights.

Warning

If any of the tips are not present in any of the trees the function will crash.


laduplessis/beastio documentation built on Dec. 14, 2021, 7:04 p.m.