rl_habitats | R Documentation |
Retrieve IUCN Red List assessments by habitat classification.
rl_habitats(
code = NULL,
year_published = NULL,
latest = NULL,
possibly_extinct = NULL,
possibly_extinct_in_the_wild = NULL,
scope_code = NULL,
page = 1
)
code |
Character. One or more habitat classification codes.
Use |
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 |
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 habitat codes and their descriptions.
If code
is provided, the tibble contains assessment data for the specified habitat(s), including taxon details,
description, red list category, year, assessment id, and other relevant metadata.
## Not run:
# Retrieve available habitat codes
rl_habitats()
# Retrieve assessments for the Desert
rl_habitats(code = 8)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.