View source: R/rl_biogeographical_realms.R
rl_biogeographical_realms | R Documentation |
Retrieve available biogeographical realms or detailed species assessments for one or more realms.
rl_biogeographical_realms(
code = NULL,
year_published = NULL,
latest = NULL,
possibly_extinct = NULL,
possibly_extinct_in_the_wild = NULL,
scope_code = NULL,
page = 1
)
code |
Numeric or Character. One or more biogeographical realm codes (e.g. |
year_published |
Optional. Single or numeric vector of years to filter assessments by publication year. |
latest |
Optional. Logical. If |
possibly_extinct |
Optional. Logical. Filter for species flagged as possibly extinct. |
possibly_extinct_in_the_wild |
Optional. Logical. Filter for species possibly extinct in the wild. |
scope_code |
Optional. Integer One or more scope codes to filter assessments. |
page |
Optional. Integer vector. Specify one or more page numbers to fetch.
If |
This function has two modes:
If code = NULL
, it returns a list of available biogeographical realms.
If code
is provided, it retrieves assessments for the specified realm(s),
optionally filtered by year, extinction status, scope, and page(s).
If page
is not specified, the function will automatically paginate over all
available pages for each parameter combination.
A tibble (class tbl_df``,
tbl,
data.frame) where each column represents a unique API response JSON key. If
code = NULL, the tibble contains available biogeographical realms with columns such as realm code and name. If
code' is provided, the tibble contains assessment data for the specified realm(s), including taxon details,
red list category, year, and other relevant metadata.
## Not run:
# List all available biogeographical realms
rl_biogeographical_realms()
# Retrieve all assessments for realm code 0
rl_biogeographical_realms(code = 0)
# Get latest assessments from multiple pages with filters
rl_biogeographical_realms(
code = 0,
year_published = c(2020, 2021),
page = c(1, 2)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.