is_leaf {taxa}R Documentation

Check if taxa are leaves

Description

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

Usage

is_leaf(x)

Arguments

x

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

See Also

Other leaf functions: leaves(), n_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))
is_leaf(x)


[Package taxa version 0.4.3 Index]