Last chance! 50% off unlimited learning
Sale ends in
NDescendants()
counts the number of nodes (including leaves) directly
descended from each node in a tree.
NDescendants(tree)
A tree of class phylo
.
NDescendants()
returns an integer listing the number of direct
descendants (leaves or internal nodes) for each node in a tree.
Other tree navigation:
AncestorEdge()
,
CladeSizes()
,
DescendantEdges()
,
EdgeAncestry()
,
EdgeDistances()
,
ListAncestors()
,
MRCA()
,
NodeDepth()
,
NodeOrder()
,
NonDuplicateRoot()
,
RootNode()
# NOT RUN {
tree <- CollapseNode(BalancedTree(8), 12:15)
NDescendants(tree)
plot(tree)
nodelabels(NDescendants(tree))
# }
Run the code above in your browser using DataLab