B1I: Calculation of the B1 index for rooted trees

Description Usage Arguments Value Author(s) References Examples

View source: R/B1I.R

Description

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)=āˆ‘_{u in V'_in(T)} h(T_u)^(-1)

in which V'_in(T) 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.

Usage

1
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

1
2
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
B1I(tree)

treebalance documentation built on Oct. 17, 2021, 5:06 p.m.

Related to B1I in treebalance...