Learn R Programming

phytools (version 0.1-0)

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.

See Also

estDiversity, fitDiversityModel

Examples

Run this code
tree<-rtree(10)
  X<-nodeHeights(tree)

Run the code above in your browser using DataLab