tiporder {spider} | R Documentation |
Orders tip labels by their position on the tree.
Description
Provides an ordered vector of tip labels, corresponding to their position on the tree.
Usage
tiporder(phy, labels = TRUE)
Arguments
phy |
A tree of class ‘phylo’. |
labels |
Logical. Should labels be printed? If FALSE, the indices are given. Default of TRUE. |
Value
A character or numeric vector giving the names of the tip in the
order of their position on the tree. The order is that from top to bottom
when the tree is plotted with direction = "rightwards"
.
Author(s)
Samuel Brown <s_d_j_brown@hotmail.com>
Examples
data(anoteropsis)
anoTree <- ape::nj(ape::dist.dna(anoteropsis))
tiporder(anoTree)
tiporder(anoTree, labels = FALSE)
data(woodmouse)
woodTree <- ape::nj(ape::dist.dna(woodmouse))
tiporder(woodTree)
tiporder(ape::ladderize(woodTree))
[Package spider version 1.5.0 Index]