averageTree: Compute an average tree from a set of trees and related...

View source: R/ls.consensus.R

averageTreeR Documentation

Compute an average tree from a set of trees and related operations


Compute average trees or consensus trees by various criteria.


averageTree(trees, start=NULL, method="quadratic.path.difference",
   tol=1e-12, quiet=FALSE, ...)
ls.consensus(trees, start=NULL, tol=1e-12, quiet=FALSE, ...)
minTreeDist(tree, trees, method="quadratic.path.difference", ...)



object of class "multiPhylo".


object of class "phylo". For minTreeDist the tree on which to find the edge lengths that minimize the distance to the phylogenies in trees.


starting tree for optimization.


distance criterion for minimization. Options are "symmetric.difference", "branch.score.difference", "path.difference", and "quadratic.path.difference".


tolerance value for optimization.


logical value indicating whether to run "quietly" or not.


other arguments to be passed internally.


The function averageTree tries to find the (hypothetical) tree topology and branch lengths that has a minimum distance to all the trees in an input set, according to some user-specified tree distance measure.

The function ls.consensus computes the least-squares consensus tree (Lapointe & Cucumel, 1997) from a set of input trees.

Finally, the function minTreeDist finds the tree in the input set that is a minimum distance to all the other trees in the set. (This contrasts with averageTree which can return a tree not in the input set.)


An object of class "phylo" with edge lengths.


Liam Revell liam.revell@umb.edu


Lapointe, F.-J., G. Cucumel (1997) The average consensus procedure: Combination of weighted trees containing identical or overlapping sets of taxa. Systematic Biology, 46, 306-312.

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

phytools documentation built on Nov. 10, 2023, 1:08 a.m.