nodeHeights: Compute the heights above the root of each node
Description
This function computes node heights (primarily for estDiversity).
Usage
nodeHeights(tree)
Arguments
tree
is a phylogenetic tree in "phylo" format.
Value
a matrix of the same dimensions as tree$edge containing the height above the root of each node in edge.
Details
The function also gives a handy way to get the total length of the tree from the root to the heighest tip which will be given by max(nodeHeights(tree)).