Description Usage Arguments Value Author(s) References Examples

This function calculates the weighted l1 distance index *Dl1(T)* for a
given rooted binary tree *T*. *Dl1(T)* is defined as

*Dl1(T)= ∑ z*|f_n(z)-p_n(z)|
over all possible sizes 2<=z<=n*

in which *n* denotes the
number of leaves of *T*, *f_n(z)* denotes the frequency of pending subtrees
of size *z* in *T* and *p_n(z)* is the expected number of
pending subtrees of size *z* under the Yule model, i.e. *p_n(z)=1/(n-1)*
if *z=n* and otherwise *n/(n-1)*2/(z*(z+1))*.

For *n=1* the function returns *Dl1(T)=0*.

1 | ```
weighL1dist(tree)
``` |

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

`weighL1distI`

returns the weighted l1 distance index of the given tree.

Sophie Kersting

M. G. Blum and O. François. On statistical tests of phylogenetic tree imbalance: The Sackin and other indices revisited. Mathematical Biosciences, 195(2):141-153, 2005. doi: 10.1016/j.mbs.2005.03.003.

1 2 | ```
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
weighL1dist(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.