Description Usage Arguments Value Author(s) References Examples

This function calculates the equal weights Colless index *I_2(T)* for a
given rooted binary tree *T*. *I_2(T)* is defined as

*
I_2(T)=1/(n-2)* ∑ |n_ua-n_ub|/(n_u-2) over all u in V_in(T) with n_u>2*

in which *V_in(T)* denotes the set of all inner vertices of *T*,
and in which *n_u*, *n_ua* and *n_ub* denote the number of
leaves in the pending subtrees that are rooted at *u* and the two direct
descendants of *u*. The equal weights Colless index is an imbalance index.

For *n=1* and *n=2* the function returns *I_2(T)=0* and a warning.

1 | ```
ewCollessI(tree)
``` |

`tree` |
A rooted binary tree in phylo format. |

`ewCollessI`

returns the equal weights Colless index of the given tree.

Luise Kuehn

A. O. Mooers and S. B. Heard. Inferring Evolutionary Process from Phylogenetic Tree Shape. The Quarterly Review of Biology, 72(1), 1997. doi: 10.1086/419657.

1 2 | ```
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
ewCollessI(tree)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.