RenumberTips(tree, tipOrder) sorts the tips of a phylogenetic tree tree
such that the indices in tree[["edge"]][, 2] correspond to the order of
leaves given in tipOrder.
Usage
RenumberTips(tree, tipOrder)
# S3 method for class 'phylo'
RenumberTips(tree, tipOrder)
# S3 method for class 'Splits'
RenumberTips(tree, tipOrder)
# S3 method for class 'multiPhylo'
RenumberTips(tree, tipOrder)
# S3 method for class 'list'
RenumberTips(tree, tipOrder)
# S3 method for class '`NULL`'
RenumberTips(tree, tipOrder)Arguments
- tree
A tree of class
phylo.- tipOrder
A character vector containing the values of
tree[["tip.label"]]in the desired sort order, an object (perhaps of classphyloorSplits) with tip labels, or a numeric specifying the desired order.
Value
RenumberTips() returns tree, with the tips' internal
representation numbered to match tipOrder.
See also
Other tree manipulation:
AddTip(),
CollapseNode(),
ConsensusWithout(),
DropTip(),
ImposeConstraint(),
KeptPaths(),
KeptVerts(),
LeafLabelInterchange(),
MakeTreeBinary(),
Renumber(),
RenumberTree(),
RootTree(),
SortTree(),
Subtree(),
TipTimedTree(),
TrivialTree
Examples
data("Lobo") # Loads the phyDat object Lobo.phy
tree <- RandomTree(Lobo.phy)
tree <- RenumberTips(tree, names(Lobo.phy))