Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

NDescendants

Count descendants for each node in a tree


Description

NDescendants() counts the number of nodes (including leaves) directly descended from each node in a tree.

Usage

NDescendants(tree)

Arguments

tree

A tree of class phylo.

Value

NDescendants() returns an integer listing the number of direct descendants (leaves or internal nodes) for each node in a tree.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

See Also

Examples

tree <- CollapseNode(BalancedTree(8), 12:15)
NDescendants(tree)
plot(tree)
nodelabels(NDescendants(tree))

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.