get_data: Get data in a taxmap object by name

View source: R/old_taxa--taxonomy--s3.R

get_dataR Documentation

Get data in a taxmap object by name

Description

Given a vector of names, return a list of data (usually lists/vectors) contained in a [taxonomy()] or [taxmap()] object. Each item will be named by taxon ids when possible.

obj$get_data(name = NULL, ...)
get_data(obj, name = NULL, ...)

Arguments

obj

A [taxonomy()] or [taxmap()] object

name

('character') Names of data to return. If not supplied, return all data listed in [all_names()].

...

Passed to [all_names()]. Used to filter what kind of data is returned (e.g. columns in tables or function output?) if 'name' is not supplied or what kinds are allowed if 'name' is supplied.

Value

'list' of vectors or lists. Each vector or list will be named by associated taxon ids if possible.

See Also

Other NSE helpers: all_names(), data_used, names_used

Examples

# Get specific values
get_data(ex_taxmap, c("reaction", "n_legs", "taxon_ranks"))

# Get all values
get_data(ex_taxmap)


metacoder documentation built on April 4, 2023, 9:08 a.m.