Browse the group values a grouped enrichment can filter on
Source:R/enrichment.R
enrichment_groups.RdSome enrichment doors attach data per group: GRIIS invasive status by country
(add_griis()), WCVP native ranges by TDWG region (add_wcvp()), vernacular
names by language (add_common_names()), alien first records by country
(add_alien_first_records()). This lists the valid group values for such a
door, the way enrichment_cols() lists a door's columns, so a country,
region, or language code need not be guessed. Read offline from the local
.vtr metadata (falling back to the manifest, then a scan of the .vtr); the
first call may trigger the one-time download.
Arguments
- source
Character. A grouped enrichment name (see
list_enrichments()).- verbose
Logical. Print the group column and count. Default
TRUE.
Value
A character vector of the available group values, sorted. Stops with a
pointer to enrichment_cols() when source is a flat (non-grouped)
enrichment, which has no group values.
Examples
old <- options(taxify.data_dir = taxify_example_data())
enrichment_groups("griis") # ISO country codes GRIIS covers
options(old)