maxWidth {treebalance} | R Documentation |
Calculation of the maximum width of the tree
Description
This function calculates the maximum width for a
given rooted tree
. The tree must not necessarily be binary.
is defined as
in which denotes the height of the tree
and
denotes
the number of vertices in
that have depth
. The maximum width
is a balance index.
For details on the maximum width, see
also Chapter 23 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_23).
Usage
maxWidth(tree)
Arguments
tree |
A rooted tree in phylo format. |
Value
maxWidth
returns the maximum width of a tree.
Author(s)
Sophie Kersting
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
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
maxWidth(tree)
tree <- ape::read.tree(text="((,),((((,),),),(,)));")
maxWidth(tree)
[Package treebalance version 1.2.0 Index]