Skip to contents

Use rgbif to find the best match for the name given and return the taxon key

Usage

get_key(query, rank)

Arguments

query

The search parameter to pass to rgbif::name_suggest()

rank

The taxonimic rank associated with the search parameter

Value

The taxon key that GBIF needs to search its database for occurrence records

Examples

# Each of these examples reflect a different taxonomic rank
# Only the first will run with "Run Examples" to limit GBIF API calls
key <- get_key(query = "Phelsuma", rank = "genus")
if (FALSE) { # \dontrun{
key <- get_key(query = "Tamias ruficaudus ruficaudus", rank = "subspecies")
key <- get_key(query = "Naesiotus akamatus", rank = "species")
key <- get_key(query = "Araneae", rank = "order")
} # }