node.height {phybase}R Documentation

Calculate node height

Description

The function calculates the height of a node. The tree is assumed to be an ultramatric tree.

Usage

node.height(inode, nodematrix, nspecies)

Arguments

inode the node number
nodematrix the tree node matrix
nspecies the number of species in the tree

Value

The function returns the height of inode.

Author(s)

Liang Liu lliu@oeb.harvard.edu

See Also

subtree.length

Examples

tree.string<-"(((H:4.2,C:4.2):3.1,G:7.3):6.3,O:13.5);"
nodematrix<-read.tree.nodes(tree.string)$nodes
node.height(6,nodematrix,4)


[Package phybase version 1.1 Index]