Learn R Programming

spocc (version 0.2.4)

occ_names: Search for species names across many data sources.

Description

Search for species names across many data sources.

Usage

occ_names(query = NULL, from = "gbif", limit = 100, rank = "species",
  callopts = list(), gbifopts = list(), bisonopts = list(),
  ecoengineopts = list())

Arguments

query
(character) One to many names. Either a scientific name or a common name. Specify whether a scientific or common name in the type parameter. Only scientific names supported right now.
from
(character) Data source to get data from, any combination of gbif, bison, or ecoengine.
limit
(numeric) Number of records to return. This is passed across all sources. To specify different limits for each source, use the options for each source (gbifopts, bisonopts, ecoengineopts). See Details for more. This parameter is ignored for ecoengine.
rank
(character) Taxonomic rank. Not used right now.
callopts
Options passed on to GET, e.g., for debugging curl calls, setting timeouts, etc.
gbifopts
(list) List of named options to pass on to name_lookup. See also occ_names_options.
bisonopts
(list) List of named options to pass on to bison_tax. See also occ_names_options.
ecoengineopts
(list) List of named options to pass on to ee_search. See also occ_names_options.

Details

Not all 6 data sources available from the occ function are available here, as not all of those sources have functionality to search for names.

Examples

Run this code
# Single data sources
## gbif
(res <- occ_names(query = 'Accipiter striatus', from = 'gbif'))
head(res$gbif$data[[1]])

## bison
(res <- occ_names(query = '*bear', from = 'bison'))
res$bison$data

## ecoengine
(res <- occ_names(query = 'genus:Lynx', from = 'ecoengine'))
head(res$ecoengine$data[[1]])

Run the code above in your browser using DataLab