Description Usage Arguments Value Author(s) References See Also

This function forces an object of class `"phylo"`

to be ultrametric. This is achieved either by using `nnls.tree`

from the phangorn package to compute the set of edge lengths that result in a minimized sum-of-squares distance between the patristic distance of the output and input trees (`method="nnls"`

); or by simply extending all the external edges of the tree to match the external edge with the greatest total height (`method="extend"`

).

Note that neither of these should be treated as formal statistical methods for inferring an ultrametric tree. Rather, this method can be deployed when a genuinely ultrametric tree read from file fails `is.ultrametric`

for reasons of numerical precision.

1 | ```
force.ultrametric(tree, method=c("nnls","extend"))
``` |

`tree` |
an object of class |

`method` |
the method to use to force the tree to be ultrametric. Options are |

An ultrametric tree in an object of class `"phylo"`

.

Liam Revell liam.revell@umb.edu

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). *Methods Ecol. Evol.*, **3**, 217-223.

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.