View source: R/ct_check_name.R
| ct_check_name | R Documentation |
This function queries the Integrated Taxonomic Information System (ITIS) to find taxonomic details for a given species name. It can search using either a scientific name or a common name and return relevant taxonomic information, including the TSN.
ct_check_name(
species_name,
search_type = c("common_name", "scientific_name"),
ask = FALSE
)
species_name |
A character string specifying the species name to search for. Only a single name is allowed. |
search_type |
A character string specifying the type of search. Options:
|
ask |
A logical value ( |
If the necessary packages (httr2, xml2) are not installed, the function prompts the user to install them.
If multiple results are found and ask = TRUE, the user is prompted to select the correct match.
If no exact match is found, all results are displayed for manual selection.
A tibble containing taxonomic details:
search: The original species name queried.
tsn: The Taxonomic Serial Number (TSN) from ITIS.
common_name: The common name of the species (if available).
scientific_name: The scientific name of the species.
author: The author who classified the species.
itis_url: A direct link to the species report on ITIS.
taxon_status: The taxonomic status of the species.
# Search for a species by scientific name
ct_check_name("Panthera leo", search_type = "scientific_name")
# Search by common name with interactive selection
ct_check_name("Lion", search_type = "common_name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.