powered by
SortTree() sorts each node into a consistent order, so that node rotation does not obscure similarities between similar trees.
SortTree()
SortTree(tree)# S3 method for phylo SortTree(tree)# S3 method for list SortTree(tree)# S3 method for multiPhylo SortTree(tree)
# S3 method for phylo SortTree(tree)
# S3 method for list SortTree(tree)
# S3 method for multiPhylo SortTree(tree)
One or more trees of class phylo, optionally as a list or a multiPhylo object.
phylo
multiPhylo
SortTree() returns tree in the format of tree, with each node in each tree sorted such that the larger clade is first.
tree
At each node, clades will be listed in tree$edge in decreasing size order.
tree$edge
Clades that contain the same number of leaves are sorted in decreasing order of minimum leaf number, so (2, 3) will occur before (1, 4).
As trees are plotted from 'bottom up', the largest clades will 'sink' to the bottom of a plotted tree.
tree must (presently) be binary (#25).
Preorder() also rearranges trees into a consistent shape, but based on the index of leaves rather than the size of subtrees.
Preorder()
Other tree manipulation: AddTip(), CollapseNode(), ConsensusWithout(), DropTip(), EnforceOutgroup(), LeafLabelInterchange(), MakeTreeBinary(), RenumberTips(), RenumberTree(), Renumber(), RootTree(), SingleTaxonTree(), Subtree()
AddTip()
CollapseNode()
ConsensusWithout()
DropTip()
EnforceOutgroup()
LeafLabelInterchange()
MakeTreeBinary()
RenumberTips()
RenumberTree()
Renumber()
RootTree()
SingleTaxonTree()
Subtree()
# NOT RUN { messyTree <- as.phylo(10, 6) plot(messyTree) sorted <- SortTree(messyTree) plot(sorted) ape::nodelabels() ape::edgelabels() # }
Run the code above in your browser using DataLab