avgVertDep {treebalance} | R Documentation |
Calculation of the average vertex depth for rooted trees
Description
This function calculates the average vertex depth for a given rooted
tree
. The tree must not necessarily be binary.
is defined as
in
which denotes the set of vertices of
, and
denotes the depth of the vertex
. The average vertex depth is a normalised version of the total path length and an
imbalance index.
For the function returns
and a warning.
For details on the average vertex depth, see
also Chapter 23 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_23).
Usage
avgVertDep(tree)
Arguments
tree |
A rooted tree in phylo format. |
Value
avgVertDep
returns the average vertex depth of the given tree.
Author(s)
Luise Kuehn
References
A. Herrada et al. Scaling properties of protein family phylogenies. BMC Evolutionary Biology, 11(1), June 2011. doi: 10.1186/1471-2148-11-155.
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,,),),(,)));")
avgVertDep(tree)