DescendantEdges() efficiently identifies edges that are "descended" from
edges in a tree.
DescendantTips() efficiently identifies leaves (external nodes) that are
"descended" from edges in a tree.
Arguments
- parent
Integer vector corresponding to the first column of the edge matrix of a tree of class
phylo, i.e.tree[["edge"]][, 1]- child
Integer vector corresponding to the second column of the edge matrix of a tree of class
phylo, i.e.tree[["edge"]][, 2].- edge
Integer specifying the number of the edge whose children are required (see
edgelabels()).- node
Integer specifying the number(s) of nodes whose children are required. Specify
0to return all nodes. IfNULL(the default), theedgeparameter will be used instead.- nEdge
number of edges (calculated from
length(parent)if not supplied).- includeSelf
Logical specifying whether to mark
edgeas its own descendant.
Value
DescendantEdges() returns a logical vector stating whether each
edge in turn is the specified edge (if includeSelf = TRUE)
or one of its descendants.
DescendantTips() returns a logical vector stating whether each
leaf in turn is a descendant of the specified edge.
See also
Other tree navigation:
AncestorEdge(),
CladeSizes(),
EdgeAncestry(),
EdgeDistances(),
ListAncestors(),
MRCA(),
MatchEdges(),
NDescendants(),
NodeDepth(),
NodeNumbers(),
NodeOrder(),
RootNode()
