Check species name and retrieve Taxonomic Serial Number (TSN) from ITIS
mm_check_name.Rd
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.
Arguments
- 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:
"sientific_name"
: Search by scientific name."common_name"
: Search by common name.
- ask
A logical value (
TRUE
orFALSE
). IfTRUE
, allows interactive selection when multiple matches are found.
Value
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.
Details
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.