Learn R Programming

rgbif (version 0.7.7)

name_suggest: A quick and simple autocomplete service that returns up to 20 name usages by doing prefix matching against the scientific name. Results are ordered by relevance.

Description

A quick and simple autocomplete service that returns up to 20 name usages by doing prefix matching against the scientific name. Results are ordered by relevance.

Usage

name_suggest(q = NULL, datasetKey = NULL, rank = NULL, fields = NULL,
  start = NULL, limit = 100, ...)

Arguments

q
(character, required) Simple search parameter. The value for this parameter can be a simple word or a phrase. Wildcards can be added to the simple word parameters only, e.g. q=*puma*
datasetKey
(character) Filters by the checklist dataset key (a uuid, see examples)
rank
(character) A taxonomic rank. One of class, cultivar, cultivar_group, domain, family, form, genus, informal, infrageneric_name, infraorder, infraspecific_name, infrasubspecific_name, kingdom, order, phylum, section, series, species, strain, subclass, subf
fields
(character) Fields to return in output data.frame (simply prunes columns off)
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 data.frame with fields selected by fields arg.

References

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

Examples

Run this code
name_suggest(q='Puma concolor')
name_suggest(q='Puma')
name_suggest(q='Puma', rank="genus")
name_suggest(q='Puma', rank="subspecies")
name_suggest(q='Puma', rank="species")
name_suggest(q='Puma', rank="infraspecific_name")

name_suggest(q='Puma', limit=2)
name_suggest(q='Puma', fields=c('key','canonicalName'))
name_suggest(q='Puma', fields=c('key','canonicalName','higherClassificationMap'))

# Pass on httr options
library('httr')
res <- name_suggest(q='Puma', limit=200, config=progress())

Run the code above in your browser using DataLab