powered by
Identify, for each edge, whether it denotes a different partition from the root edge. The first edge of the input tree must be a root edge; this can be accomplished using Preorder().
Preorder()
NonDuplicateRoot(parent, child, nEdge = length(parent))
NonDuplicateRoot() returns a logical vector of length nEdge, specifying TRUE unless an edge identifies the same partition as the root edge.
NonDuplicateRoot()
nEdge
TRUE
Integer vector corresponding to the first column of the edge matrix of a tree of class phylo, i.e. tree[["edge"]][, 1]
phylo
tree[["edge"]][, 1]
Integer vector corresponding to the second column of the edge matrix of a tree of class phylo, i.e. tree[["edge"]][, 2].
tree[["edge"]][, 2]
(optional) integer specifying the number of edges of a tree of class phylo, i.e. dim(tree[["edge"]])[1]
dim(tree[["edge"]])[1]
Martin R. Smith (martin.smith@durham.ac.uk)
This function is deprecated; if you use it, please comment (#32) so that a suitable replacement can be guaranteed.
Other tree navigation: AncestorEdge(), CladeSizes(), DescendantEdges(), EdgeAncestry(), EdgeDistances(), ListAncestors(), MRCA(), NDescendants(), NodeDepth(), NodeOrder(), RootNode()
AncestorEdge()
CladeSizes()
DescendantEdges()
EdgeAncestry()
EdgeDistances()
ListAncestors()
MRCA()
NDescendants()
NodeDepth()
NodeOrder()
RootNode()
tree <- Preorder(BalancedTree(8)) edge <- tree$edge parent <- edge[, 1] child <- edge[, 2] which(!NonDuplicateRoot(parent, child))
Run the code above in your browser using DataLab