View source: R/worms_api_functions.R
add_worms_taxonomy | R Documentation |
This function collects WoRMS (World Register of Marine Species) taxonomy information for a given set of Aphia IDs. The data is organized into a full taxonomic table that can be joined with data downloaded from SHARK.
add_worms_taxonomy(aphia_id, scientific_name = NULL, verbose = TRUE)
aphia_id |
A numeric vector containing Aphia IDs for which WoRMS taxonomy needs to be updated. |
scientific_name |
A character vector of scientific names. If provided, Aphia IDs will be retrieved from the scientific names. The length of |
verbose |
A logical indicating whether to print progress messages. Default is TRUE. |
A data frame containing current WoRMS taxonomy information.
get_shark_data
, update_dyntaxa_taxonomy
, https://www.marinespecies.org/rest/, https://CRAN.R-project.org/package=worrms
## Not run:
# Update WoRMS taxonomy for a set of Aphia IDs
updated_taxonomy <- add_worms_taxonomy(c(149619, 149122, 11))
print(updated_taxonomy)
# Update WoRMS with an unknown Aphia ID and scientific names
with_names <- add_worms_taxonomy(c(149619, 149122, 11, NA),
c("Cerataulina pelagica",
"Chaetoceros didymus",
"Ciliophora",
"Dinophysis"))
print(with_names)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.