calcNdBlnc: Calculate the balance of a node

Description Usage Arguments Details See Also Examples

View source: R/calc-methods.R

Description

Returns the balance of a node.

Usage

1
calcNdBlnc(tree, id)

Arguments

tree

TreeMan object

id

node id

Details

Balance is calculated as the absolute difference between the number of descendents of the two bifurcating edges of a node and the expected value for a balanced tree. NA is returned if the node is polytomous or a tip.

See Also

calcNdsBlnc, https://github.com/DomBennett/treeman/wiki/calc-methods

Examples

1
2
3
library(treeman)
tree <- randTree(10)
calcNdBlnc(tree, id=tree['root'])  # root balance

treeman documentation built on June 27, 2017, 9:02 a.m.

Search within the treeman package
Search all R packages, documentation and source code