mCherryI: Calculation of the modified cherry index for rooted binary...

View source: R/mCherryI.R

mCherryIR Documentation

Calculation of the modified cherry index for rooted binary trees

Description

This function calculates the modified cherry index mChI(T) for a given rooted binary tree T. Note that compared to the original cherry index ChI(T), the modified cherry index is defined for binary trees only. mChI(T) is defined as n-2\cdot ChI(T), i.e. it counts the number of leaves of the tree which are not in a cherry. A cherry is a pair of leaves that have the same direct ancestor.

The modified cherry index does not fulfill the definition of an (im)balance index given in "Tree balance indices: a comprehensive survey" (Fischer et al., 2023).

For details on the modified cherry index, see also Chapter 24 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_24).

Usage

mCherryI(tree)

Arguments

tree

A rooted binary tree in phylo format.

Value

mCherryI returns the modified cherry index of the given tree.

Author(s)

Luise Kuehn

References

S. J. Kersting, M. Fischer. Measuring tree balance using symmetry nodes — A new balance index and its extremal properties. Mathematical Biosciences, 341:108690, 2021. doi: 10.1016/j.mbs.2021.108690.

Examples

tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
mCherryI(tree)
tree <- ape::read.tree(text="((,),((((,),),),(,)));")
mCherryI(tree)


treebalance documentation built on May 29, 2024, 1:15 a.m.