Skip to contents

Clean a keys output to ensure only accepted species from GBIF and/or WCVP are being analysed

Usage

clean_keys(keys, override_gbif_status = FALSE, override_wcvp_status = FALSE)

Arguments

keys

data frame of GBIF and/or WCVP identifier keys, as produced by get_name_keys(). Must have a sources attribute indicating which sources are present (e.g. "GBIF", "WCVP", or both).

override_gbif_status

if TRUE it will ignore the check on taxonomic status as returned by GBIF i.e. SYNONYMS will be allowed.

override_wcvp_status

if TRUE it will ignore the check on taxonomic status as returned by WCVP

Value

Returns a data frame with cleaned keys, retaining only records that are accepted and at species rank in all present sources.

Details

Problematic records e.g. those not accepted in GBIF or WCVP, or not at species level are removed. WCVP filtering is only applied when WCVP data are present in keys (i.e. "WCVP" appears in the sources attribute). Duplicate records are reported but not removed.