maxDelW: Calculation of the maximal difference in widths for a rooted...

Description Usage Arguments Value Author(s) References Examples

View source: R/maxDelW.R

Description

This function calculates the maximal difference in widths maxDelW(T) for a given rooted tree T. The tree must not necessarily be binary. maxDelW(T) is defined as

maxDelW(T)=max_{i=0,...,h(T)-1} w(i+1)-w(i)

in which h(T) denotes the height of the tree T and w(i) denotes the number of vertices in T that have depth i. The maximal difference in widths is a balance index.

Usage

1
maxDelW(tree)

Arguments

tree

A rooted tree in phylo format.

Value

maxDelW returns the maximal difference in widths of a tree.

Author(s)

Sophie Kersting, Luise Kuehn

References

C. Colijn and J. Gardy. Phylogenetic tree shapes resolve disease transmission patterns. Evolution, Medicine, and Public Health, 2014(1):96-108, 2014. ISSN 2050-6201. doi: 10.1093/emph/eou018.

Examples

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

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