stems: Get stems

Description Usage Arguments See Also Examples

View source: R/taxonomy.R

Description

Get stem indexes for each taxon or another per-taxon value.

Usage

1
stems(x, value = NULL, ...)

Arguments

x

An object with taxonomic relationships, like taxonomy objects.

value

Something to return instead of indexes. Must be the same length as the number of taxa.

...

Additional arguments.

See Also

Other taxonomy functions: internodes(), leaves(), roots(), subtaxa(), supertaxa()

Other stem functions: is_stem()

Examples

1
2
3
4
5
6
x <- taxonomy(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo',
                'Panthera tigris'),
              supertaxa = c(NA, 1, 2, 3, 3))
x <- c(x, x)
stems(x)
stems(x, value = tax_name(x))

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