R: Calculate the balance of a node

calcNdBlnc {treeman} | R Documentation

## Calculate the balance of a node

### Description

Returns the balance of a node.

### Usage

    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

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

[Package treeman version 1.1.4 Index]