Get stem indexes for each taxon or another per-taxon value.
Usage
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.
Examples
x <- taxonomy(c('Carnivora', 'Felidae', 'Panthera', 'Panthera leo',
'Panthera tigris'),
supertaxa = c(NA, 1, 2, 3, 3))
x <- c(x, x)
stems(x)
#> [[1]]
#> [1] 1 2
#>
#> [[2]]
#> [1] 6 7
#>
stems(x, value = tax_name(x))
#> [[1]]
#> [1] "Carnivora" "Felidae"
#>
#> [[2]]
#> [1] "Carnivora" "Felidae"
#>