get.rooted.tree.height: Get a Rooted Tree Height

View source: R/p_tool_star_tree.r

get.rooted.tree.heightR Documentation

Get a Rooted Tree Height

Description

This function gets a rooted tree height, and only meaningful for a ultrametric tree which has the equal height from the root to all leaves.

Usage

get.rooted.tree.height(rooted.tree,
    tol = .Machine$double.eps^0.5)

Arguments

rooted.tree

a rooted tree in Class phylo.

tol

for is.ultrametric of ape.

Details

The rooted.tree should be in a phylo class of ape, and should be ultrametric that may be created by ms.

Value

Return the rooted tree height.

Author(s)

Wei-Chen Chen wccsnow@gmail.com

References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

See Also

ms, read.tree, as.phylo, is.ultrametric, rescale.rooted.tree.

Examples

## Not run: 
library(phyclust, quiet = TRUE)

set.seed(1234)
ret.ms <- ms(5, 1, opts = paste("-T", sep = " "))
tree.ms <- read.tree(text = ret.ms[3])
is.ultrametric(tree.ms)
get.rooted.tree.height(tree.ms)

## End(Not run)

snoweye/phyclust documentation built on Sept. 12, 2023, 5 a.m.