A wrapper for ape:::.reorder_ape
.
Calling this C function directly is approximately twice as fast as using
ape::cladewise
or ape::postorder
Cladewise(tree, nTaxa = NULL, edge = tree$edge)Postorder(tree, nTaxa = length(tree$tip.label), edge = tree$edge)
PostorderEdges(parent, child, nEdge = length(parent), nNode = nEdge/2L,
nTaxa = nNode + 1L)
Pruningwise(tree, nTaxa = length(tree$tip.label), edge = tree$edge)
Preorder(tree)
A tree of class phylo
.
(optional) number of tips in the tree
(optional) the value of tree$edge
the first column of the edge matrix of a tree of class
phylo
, i.e. tree$edge[, 1]
the second column of the edge matrix of a tree of class
phylo
, i.e. tree$edge[, 2]
Number of terminal taxa in tree.
A tree with nodes numbered in postorder
Postorder
: Reorder tree in Postorder
PostorderEdges
: Reorder parent and child edges in Postorder
Pruningwise
: Reorder tree Pruningwise
Preorder
: Reorder tree in Preorder (special case of cladewise)
All nodes in a tree must be bifurcating; ape::collapse.singles and ape::multi2di may help.