Learn R Programming

phyloTop (version 2.1.2)

colless.phylo: Colless number

Description

Finds the Colless number for a tree. Note that the package apTreeshape has a function colless to compute the Colless imbalance with additional options to normalise it based on the model; we include this simple function here for convenience within this package, and for use on objects of class phylo and phylo4.

Usage

colless.phylo(tree, normalise = TRUE)

Value

The Colless imbalance number of the tree.

Arguments

tree

a tree of class phylo or phylo4. The tree should be binary and rooted; if not it will be coerced into a binary rooted tree using multi2di, if possible.

normalise

option to normalise the result by dividing by the number of tip pairs. Defaults to TRUE.

Author

Michael Boyd mboyd855@gmail.com

Michelle Kendall michelle.louise.kendall@gmail.com

Examples

Run this code
## Find the Colless imbalance of a random tree with 10 tips:
tree <- rtree(10)
plot(tree)
colless.phylo(tree)


Run the code above in your browser using DataLab