rl_sp_country: Get species by country

Description Usage Arguments Value References Examples

View source: R/rl_sp_country.R

Description

Get species by country

Usage

1
2
3
rl_sp_country(country, key = NULL, parse = TRUE, ...)

rl_sp_country_(country, key = NULL, ...)

Arguments

country

(character) A two-letter country code. See isocode column in result of rl_countries() request for country codes.

key

A IUCN API token. See http://apiv3.iucnredlist.org/api/v3/token to get a token

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient

Value

A list, with the data in the result slot, unless using a function with a trailing underscore, in which case json as character string is returned.

References

API docs at http://apiv3.iucnredlist.org/api/v3/docs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
rl_sp_country('AZ')
rl_sp_country('NZ')

# don't parse to data.frame, gives list
rl_sp_country('NZ', parse = FALSE)
# don't parse at all, get json back
rl_sp_country_('NZ')

# curl options
res <- rl_sp_country('NZ', verbose = TRUE)

## End(Not run)

rredlist documentation built on Aug. 26, 2017, 9:03 a.m.