Learn R Programming

rgbif (version 0.7.7)

name_usage: Lookup details for specific names in all taxonomies in GBIF.

Description

This service uses fuzzy lookup so that you can put in partial names and you should get back those things that match. See examples below.

This function is different from name_lookup in that that function searches for names, while this function requires that you already have a key.

Note that verbatim hasn't been working

Options for the data parameter are: 'all', 'verbatim', 'name', 'parents', 'children', 'related', 'synonyms', 'descriptions','distributions', 'images', 'references', 'speciesProfiles', 'vernacularNames', 'typeSpecimens', 'root'

Usage

name_usage(key = NULL, name = NULL, data = "all", language = NULL,
  datasetKey = NULL, uuid = NULL, sourceId = NULL, rank = NULL,
  shortname = NULL, start = NULL, limit = 100, ...)

Arguments

key
(numeric) A GBIF key for a taxon
name
(character) Filters by a case insensitive, canonical namestring, e.g. 'Puma concolor'
data
(character) Specify an option to select what data is returned. See Description below.
language
(character) Language, default is english
datasetKey
(character) Filters by the dataset's key (a uuid)
uuid
(character) A uuid for a dataset. Should give exact same results as datasetKey.
sourceId
(numeric) Filters by the source identifier. Not used right now.
rank
(character) Taxonomic rank. Filters by taxonomic rank as one of: CLASS, CULTIVAR, CULTIVAR_GROUP, DOMAIN, FAMILY, FORM, GENUS, INFORMAL, INFRAGENERIC_NAME, INFRAORDER, INFRASPECIFIC_NAME, INFRASUBSPECIFIC_NAME, KINGDOM, ORDER, PHYLUM, SECTION, SERIES,
shortname
(character) A short name..need more info on this?
start
Record number to start at. Use in combination with limit to page through results. Note that in occ_search we do the paging internally for you, so there's no start parameeter, but in other fu
limit
Number of records to return. Defaults: For occ_search 500, for others 100. Maximum: 1,000,000 records for occ_search, others, don't know yet.
...
Further named parameters, such as query, path, etc, passed on to modify_url within GET call. Unnamed parameters will be comb

Value

  • A list of length two. The first element is metadata. The second is either a data.frame (verbose=FALSE, default) or a list (verbose=TRUE)

References

http://www.gbif.org/developer/species#nameUsages

Examples

Run this code
# All name usages
name_usage()

# A single name usage
name_usage(key=1)

# Name usage for a taxonomic name
name_usage(name='Puma concolor')
name_usage(name='Puma', rank="GENUS")

# References for a name usage
name_usage(key=3119195, data='references')

# Species profiles, descriptions
name_usage(key=3119195, data='speciesProfiles')
name_usage(key=3119195, data='descriptions')
res <- name_usage(key=2435099, data='children')
sapply(res$results, "[[", "scientificName")

# Vernacular names for a name usage
name_usage(key=3119195, data='vernacularNames')

# Limit number of results returned
name_usage(key=3119195, data='vernacularNames', limit=3)

# Search for names by dataset with datasetKey parameter
name_usage(datasetKey="d7dddbf4-2cf0-4f39-9b2a-bb099caae36c")

# Search for a particular language
name_usage(key=3119195, language="FRENCH", data='vernacularNames')

# Pass on httr options
library('httr')
res <- name_usage(name='Puma concolor', limit=300, config=progress())

Run the code above in your browser using DataLab