supertaxa

0th

Percentile

Get all supertaxa of a taxon

Return the taxon IDs or taxon_data indexes of all supertaxa (i.e. all taxa the target taxa are a part of) in an object of type taxmap.

Usage
supertaxa(obj, subset = NULL, recursive = TRUE, simplify = FALSE, include_input = FALSE, index = FALSE, na = FALSE)
Arguments
obj
(taxmap) The taxmap object containing taxon information to be queried.
subset
(character) taxon_ids or indexes of taxon_data for which supertaxa will be returned. Default: All taxa in obj will be used.
recursive
(logical) If FALSE, only return the supertaxa one level above the target taxa. If TRUE, return all the supertaxa of every supertaxa, etc.
simplify
(logical) If TRUE, then combine all the results into a single vector of unique values.
include_input
(logical) If TRUE, the input taxa are included in the output
index
(logical) If TRUE, return the indexes of supertaxa in taxon_data instead of taxon_ids
na
(logical) If TRUE, return NA where information is not available.
Value

If simplify = FALSE, then a list of vectors are returned corresponding to the subset argument. If simplify = TRUE, then unique values are returned in a single vector.

See Also

Other taxmap taxonomy functions: obs, roots, subtaxa

Aliases
  • supertaxa
Examples
## Not run: 
# supertaxa(contaminants, subset = 1:10)## End(Not run)
  
Documentation reproduced from package metacoder, version 0.1.2, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.