n_leaves {taxa} | R Documentation |
Number of leaves per taxon
Description
Get the number of leaves per taxon. A leaf is a taxon with no subtaxa.
Usage
n_leaves(x)
Arguments
x |
The object to get leaves for, such as a taxonomy object |
See Also
Other leaf functions:
is_leaf()
,
leaves()
Examples
x <- taxonomy(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo',
'Panthera tigris', 'Ursidae', 'Ursus', 'Ursus arctos'),
supertaxa = c(NA, 1, 2, 3, 3, 1, 6, 7))
n_leaves(x)
[Package taxa version 0.4.3 Index]