Skip to contents

Lookup names in the GBIF backbone taxonomy in a checklist.

Usage

name_backbone_checklist(name_data = NULL, verbose = FALSE, curlopts = list())

Arguments

name_data

(data.frame or vector) see details.

verbose

(logical) should the matching return non-exact matches

curlopts

list of named curl options passed on to HttpClient. see curl::curl_options for curl options

Value

A data.frame of matched names.

Details

This function is a wrapper for name_backbone(), which will work with a list of names (a vector or a data.frame). The data.frame should have the following column names, but only the 'name' column is required. If only one column is present, then that column is assumed to be the 'name' column.

  • name : (required)

  • rank : (optional)

  • kingdom : (optional)

  • phylum : (optional)

  • class : (optional)

  • order : (optional)

  • family : (optional)

  • genus : (optional)

The input columns will be returned as "verbatim_name","verbatim_rank", "verbatim_phylum" ect. A column of "verbatim_index" will also be returned giving the index of the input.

The following aliases for the 'name' column will work (any case or with '_' will work) :

  • "scientificName", "ScientificName", "scientific_name" ...

  • "sci_name", "sciname", "SCI_NAME" ...

  • "names", "NAMES" ...

  • "species", "SPECIES" ...

  • "species_name", "speciesname" ...

  • "sp_name", "SP_NAME", "spname" ...

  • "taxon_name", "taxonname", "TAXON NAME" ...

If more than one aliases is present and no column is named 'name', then the left-most column with an acceptable aliased name above is used.

This function can also be used with a character vector of names. In that case no column names are needed of course.

This function is very similar to the GBIF species-lookup tool. https://www.gbif.org/tools/species-lookup

If you have 1000s of names to match, it can take some minutes to get back all of the matches. I have tested it with 60K names. Scientific names with author details usually get better matches.

Examples

if (FALSE) {

library(rgbif)

name_data <- data.frame(
 scientificName = c(
   "Cirsium arvense (L.) Scop.", # a plant
   "Calopteryx splendens (Harris, 1780)", # an insect
   "Puma concolor (Linnaeus, 1771)", # a big cat
   "Ceylonosticta alwisi (Priyadarshana & Wijewardhane, 2016)", # newly discovered insect 
   "Puma concuolor (Linnaeus, 1771)", # a mis-spelled big cat
   "Fake species (John Waller 2021)", # a fake species
   "Calopteryx" # Just a Genus   
 ), description = c(
   "a plant",
   "an insect",
   "a big cat",
   "newly discovered insect",
   "a mis-spelled big cat",
   "a fake species",
   "just a GENUS"
 ), 
 kingdom = c(
   "Plantae",
   "Animalia",
   "Animalia",
   "Animalia",
   "Animalia",
   "Johnlia",
   "Animalia"
 ))

name_backbone_checklist(name_data)
name_backbone_checklist(name_data,verbose=TRUE) # return non-accepted names too 

# works with just vectors too 
name_list <- c(
"Cirsium arvense (L.) Scop.", 
"Calopteryx splendens (Harris, 1780)", 
"Puma concolor (Linnaeus, 1771)", 
"Ceylonosticta alwisi (Priyadarshana & Wijewardhane, 2016)", 
"Puma concuolor", 
"Fake species (John Waller 2021)", 
"Calopteryx")

name_backbone_checklist(name_list)
name_backbone_checklist(name_list,verbose=TRUE)

}