View source: R/check_classification.R
fetch_classification_from_worms | R Documentation |
Fetches taxonomic classification for a given AphiaID from WoRMS This function queries the WoRMS API to retrieve taxonomic classification information for a specified AphiaID. If the AphiaID is NA or the fetch fails, it returns NULL with a warning. The function handles HTTP response errors by warning the user and returns the classification as a list if successful.
fetch_classification_from_worms(aphia_id)
aphia_id |
An integer representing the AphiaID for which to fetch the classification. |
Returns a list containing the taxonomic levels (Kingdom, Phylum, Class, Order, Family, Genus, Species) of the classification if successful. Returns NULL if the fetch is unsuccessful or if the AphiaID is NA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.