Learn R Programming

SP2000 (version 0.2.0)

get_col_global: Search Catalogue of Life Global checklist

Description

Get Catalogue of Life Global checklist via species name and id.

Usage

get_col_global(
  query,
  option = "name",
  response = "terse",
  start = 0,
  limit = 500,
  mc.cores = 2
)

Arguments

query

string The string to search for.

option

character There is one required parameter, which is either name or id. Give eithera name or an ID. If an ID is given, the name parameter may not be used, and vice versa. option=c("id","name"),the default value is "name". Only exact matches found the name given will be returned, unless a wildcard (*) is appended. Wildcards are allowed only at the end of the string. This offers the option to e.g. search for genus* to retrieve the genus plus all its (infra)species. The name must be at least 3 characters long, not counting the wildcard character. The record ID of the specific record to return (only for scientific names of species or infraspecific taxa).

response

character Type of response returned. Valid values are response=terse and response=full. if the response parameter is omitted, the results are returned in the default terse format. If format=terse then a minimum set of results are returned (this is faster and smaller, enough for name lookup), if format=full then all available information is returned, response=c("full","terse"),the default value is "terse".

start

integer Record number to start at. If omitted, the results are returned from the first record (start=0). Use in combination with limit to page through results. Note that we do the paging internally for you, but you can manually set the start parameter.

limit

integer Number of records to return. This is useful if the total number of results is larger than the maximum number of results returned by a single Web service query (currently the maximum number of results returned by a single query is 500 for terse queries and 50 for full queries,the default value is 500.Note that there is a hard maximum of 10,000, which is calculated as the limit+start, so start=99,00 and limit=2000 won't work.

mc.cores

The number of cores to use, i.e. at most how many child processes will be run simultaneously. The option is initialized from environment variable MC_CORES if set. Must be at least one, and parallelization requires at least two cores,see mclapply for details.

Value

object

Details

Visit the website http://webservice.catalogueoflife.org/col/webservice for more details.

Examples

Run this code
# NOT RUN {
##Get Catalogue of Life Global checklist via species name
x1 <- get_col_global(query = c("Anguilla marmorata","Anguilla japonica",
                              "Anguilla bicolor","Anguilla nebulosa",
                              "Anguilla luzonensis"),
                               option = "name")
str(x1)

##full queries
x2 <- get_col_global(query = "Anguilla", response = "full")


##Find synonyms via species name
find_synonyms(query = c("Anguilla marmorata","Anguilla japonica",
                        "Anguilla bicolor","Anguilla nebulosa",
                        "Anguilla luzonensis"))
# }

Run the code above in your browser using DataLab