Check Species Names in the Red Book of Endemic Plants of Peru
Source:R/check_redbook.R
check_redbook.Rd
This function checks a list of species names against the Red Book of Endemic Plants of Peru database and provides information about whether a species was recorded as endemic, its current taxonomic status, and checks for misspelling typos (fuzzy match).
Arguments
- splist
A character vector containing the species names to be checked.
- tax_status
Logical value indicating whether to provide taxonomic status information. If TRUE, it will provide taxonomic status information. If FALSE, it will provide endemism information.
- max_distance
Maximum allowed distance for fuzzy matching of species names.
Value
A character vector with information about the taxonomic status or endemism of the provided species names.
Details
This function checks each species name in the provided list against the Red Book of Endemic Plants of Peru database. It performs fuzzy matching based on the specified maximum distance. The output could inform about taxonomic status: a) "Accepted name" if the input names recorded are valid, b) "Updated name", when the input name is currently a synonym, c) "No opinion", if the current taxonomic status of the input name is undefined, and d) "No info. available" for species names recorded in the Red Book that couldn't be found in the WCVP database for name status validation. The output name for this group of species is the name recorded in the original publication.
References
Red Book of Endemic Plants of Peru The World Checklist of Vascular Plants, a continuously updated resource for exploring global plant diversity. Taxonomic Name Resolution Service - TNRS Plants of the World Online - Facilitated by the Royal Botanic Gardens - Kew.
Examples
# Example usage of the function
splist <- c("Aphelandra cuscoenses", "Sanchezia capitata",
"Sanchezia ovata", "Piper stevensi",
"Verbesina andinaa", "Verbesina andina")
result_tax <- check_redbook(splist, tax_status = TRUE)
print(result_tax)
#> [1] "Aphelandra cuscoenses - Not endemic"
#> [2] "Sanchezia ovata - Updated name"
#> [3] "Sanchezia ovata - Not endemic"
#> [4] "Piper stevensi - Not endemic"
#> [5] "Verbesina andinaa - Not endemic"
#> [6] "Verbesina andina - No info. available"
result_endemism <- check_redbook(splist, tax_status = FALSE)
print(result_endemism)
#> [1] "Not endemic" "Endemic" "Not endemic" "Not endemic" "Not endemic"
#> [6] "Endemic"