stems

0th

Percentile

Get stem taxa

Return the stem taxa for a taxonomy() or a taxmap() object. Stem taxa are all those from the roots to the first taxon with more than one subtaxon.

obj$stems(subset = NULL, simplify = FALSE,
  value = NULL, exclude_leaves = FALSE)
stems(obj, subset = NULL, simplify = FALSE,
  value = NULL, exclude_leaves = FALSE)

Arguments
obj

The taxonomy() or taxmap() object containing taxon information to be queried.

subset

(character) Taxon IDs for which stem taxa will be returned. Default: All taxon in obj will be used.

value

What data to return. This is usually the name of column in a table in obj$data. Any result of all_names(obj) can be used, but it usually only makes sense to data that corresponds to taxa 1:1, such as taxon_ranks(). By default, taxon indexes are returned.

simplify

(logical) If TRUE, then combine all the results into a single vector of unique values.

exclude_leaves

(logical) If TRUE, the do not include taxa with no subtaxa.

Value

character

See Also

Other taxonomy indexing functions: leaves, roots, subtaxa, supertaxa

Aliases
  • stems
Examples
# NOT RUN {
# Return indexes of stem taxa
stems(ex_taxmap)

# Return indexes for a subset of taxa
stems(ex_taxmap, subset = 2:17)

# Return something besides taxon indexes
stems(ex_taxmap, value = "taxon_names")

# }
Documentation reproduced from package taxa, version 0.1.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.