B1I {treebalance} | R Documentation |
Calculation of the B1 index for rooted trees
Description
This function calculates the index
for a given rooted
tree
. The tree must not necessarily be binary.
is defined as
in which
denotes the set of inner vertices of
without the root, and
denotes the height of the pending subtree rooted at
.
When restricted to binary trees, the
index is a balance index. For
arbitrary trees it does not fulfill the definition of an (im)balance index.
For the function returns
and a warning.
For details on the B1 index, see
also Chapter 10 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_10).
Usage
B1I(tree)
Arguments
tree |
A rooted tree in phylo format. |
Value
B1I
returns the B1 index of the given tree.
Author(s)
Sophie Kersting
References
K.-T. Shao and R. R. Sokal. Tree Balance. Systematic Zoology, 39(3):266, 1990.
doi: 10.2307/2992186.
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
B1I(tree)