get_data_frame {metacoder} | R Documentation |
Get data in a taxonomy or taxmap object by name
Description
Given a vector of names, return a table of the indicated data contained in a [taxonomy()] or [taxmap()] object.
obj$get_data_frame(name = NULL, ...) get_data_frame(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. |
Details
Note: This function will not work with variables in datasets in [taxmap()] objects unless their rows correspond 1:1 with all taxa.
Value
'data.frame'
Examples
# Get specific values
get_data_frame(ex_taxmap, c("taxon_names", "taxon_indexes", "is_stem"))
[Package metacoder version 0.3.7 Index]