
Compare desired distribution information with actual one
Source:R/gbif_has_distribution.R
gbif_has_distribution.RdThis function compares GBIF distribution information based on a single taxon
key with user requests and returns a logical (TRUE or FALSE). Comparison is
case insensitive. User properties for each term are treated as OR.
It is a function built on rgbif function name_usage().
See also
Other checklist functions:
gbif_get_taxa(),
gbif_verify_keys(),
get_nubkeys(),
get_table_pathways(),
indicator_introduction_year(),
indicator_native_range_year(),
indicator_total_year(),
pathways_cbd(),
verify_taxa(),
visualize_pathways_level1(),
visualize_pathways_level2(),
visualize_pathways_year_level1(),
visualize_pathways_year_level2()
Examples
if (FALSE) { # \dontrun{
# IMPORTANT!
# examples could fail as long as `status` (`occurrenceStatus`) is used due to
# an issue of the GBIF API: see https://github.com/gbif/gbif-api/issues/94
# numeric taxonKey, atomic parameters
gbif_has_distribution(145953242,
country = "BE",
status = "PRESENT",
establishmentMeans = "INTRODUCED"
)
# character taxonKey, distribution properties as vectors, treated as OR
gbif_has_distribution("145953242",
country = c("NL", "BE"),
status = c("PRESENT", "DOUBTFUL")
)
# use alternative names: countryCode, occurrenceStatus.
# Function works. Warning is given.
gbif_has_distribution("145953242",
countryCode = c("NL", "BE"),
occurrenceStatus = c("PRESENT", "DOUBTFUL")
)
# Case insensitive
gbif_has_distribution("145953242",
country = "be",
status = "PRESENT",
establishmentMeans = "InTrOdUcEd"
)
} # }