Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rl_sp

Get species


Description

Get species

Usage

rl_sp(page = 0, key = NULL, parse = TRUE, all = FALSE, quiet = FALSE, ...)

rl_sp_(page, key = NULL, all = FALSE, quiet = FALSE, ...)

Arguments

page

(integer/numeric) Page to get. Default: 0. you can get up to 10,000 records per page. Paging is required because it's too much burden on a server to just "get all the data" in one request

key

A IUCN API token. See rl_use_iucn.

parse

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

all

(logical) to get all results or not. Default: FALSE. this means we do the paging internally for you. result is a list of results, so you have to bind them together yourself into a data.frame, see example

quiet

(logical) give progress for download or not. Default: FALSE (that is, give progress). ignored if all = FALSE

...

Curl options passed to HttpClient

Examples

## Not run: 
rl_sp(page = 3)

# get all results
out <- rl_sp(all = TRUE)
length(out)
vapply(out, "[[", 1, "count")
all_df <- do.call(rbind, lapply(out, "[[", "result"))
head(all_df)
NROW(all_df)

## End(Not run)

rredlist

'IUCN' Red List Client

v0.7.0
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre], rOpenSci [fnd] (https://ropensci.org/), Maëlle Salmon [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.