| B1I | R Documentation |
This function calculates the B1 index B1(T) for a given rooted
tree T. The tree must not necessarily be binary. B1(T) is defined as
B1(T)=\sum_{u\in V_{in}(T)\setminus\{\rho\}} h(T_u)^{-1}
in which
V_{in}(T)\setminus\{\rho\} denotes the set of inner vertices of T without the root, and
h(T_u) denotes the height of the pending subtree rooted at u.
When restricted to binary trees, the B1 index is a balance index. For
arbitrary trees it does not fulfill the definition of an (im)balance index.
For n=1 the function returns B1(T)=0 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).
B1I(tree)
tree |
A rooted tree in phylo format. |
B1I returns the B1 index of the given tree.
Sophie Kersting
K.-T. Shao and R. R. Sokal. Tree Balance. Systematic Zoology, 39(3):266, 1990.
doi: 10.2307/2992186.
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
B1I(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.