subtaxa: Get all subtaxa of a taxon
Description
Return the taxon IDs or taxon_data
indexes of all subtaxa in an object of type taxmap
Usage
subtaxa(obj, subset = NULL, recursive = TRUE, simplify = FALSE,
include_input = FALSE, index = 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 subtaxa one level below the
target taxa. If TRUE
, return all the subtaxa of every subtaxa, 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
Value
If simplify = FALSE
, then a list of vectors are returned corresponding to the
target
argument. If simplify = TRUE
, then the unique values are returned in a
single vector.
Examples
Run this code# NOT RUN {
subtaxa(contaminants, subset = 1:10)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab