is_leaf: Check if taxa are leaves

Description Usage Arguments See Also Examples

View source: R/taxonomy.R

Description

Check if each taxon is a leaf. A leaf is a taxon with no subtaxa. subtaxa.

Usage

1

Arguments

x

The object to get leaves for, such as a taxonomy object

See Also

Other leaf functions: leaves(), n_leaves()

Examples

1
2
3
4
x <- taxonomy(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo',
                'Panthera tigris', 'Ursidae', 'Ursus', 'Ursus arctos'),
              supertaxa = c(NA, 1, 2, 3, 3, 1, 6, 7))
is_leaf(x)

zachary-foster/taxa2 documentation built on Jan. 1, 2021, 1:48 p.m.