consensus | R Documentation |
Given a series of trees, this function returns the consensus tree. By
default, the strict-consensus tree is computed. To get the
majority-rule consensus tree, use p = 0.5
. Any value between
0.5 and 1 can be used.
consensus(..., p = 1, check.labels = TRUE, rooted = FALSE)
... |
either (i) a single object of class |
p |
a numeric value between 0.5 and 1 giving the proportion for a clade to be represented in the consensus tree. |
check.labels |
a logical specifying whether to check the labels
of each tree. If |
rooted |
a logical specifying whether the trees should be treated as rooted or not. |
Using check.labels = FALSE
results in
considerable decrease in computing times. This requires that all
trees have the same tip labels, and these labels are
ordered similarly in all trees (in other words, the element
tip.label
are identical in all trees).
Until ape 5.6-2, the trees passed to this function were
implicitly treated as rooted, even when the option rooted =
FALSE
was used. This is now fixed (see PR65 on GitHub) so that, by
default, the trees are explicitly treated as unrooted (even if
is.rooted
returns TRUE
). Thus, it could
be that results now differ from previous analyses (setting
rooted = TRUE
might help to replicate previous results).
an object of class "phylo"
.
Emmanuel Paradis
Felsenstein, J. (2004) Inferring Phylogenies. Sunderland: Sinauer Associates.
prop.part
, dist.topo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.