calcNdBlnc: Calculate the balance of a node

Description Usage Arguments Details See Also Examples

Description

Returns the balance of a node.

Usage

1
calcNdBlnc(tree, nid)

Arguments

tree

TreeMan object

nid

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, nid=tree['root'])  # root balance

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.