search_mtsta_distribution {mtsta} | R Documentation |
This function searches the Montane Tree Species of the Tropical Andes distribution database for a list of submitted species names and returns their distribution information. The search allows for approximate string matching within a given maximum distance.
search_mtsta_distribution(splist, max_distance = 0.1, typedf = "main")
splist |
Character vector of submitted plant species names for which distribution data is to be searched. |
max_distance |
Numeric value representing the maximum allowed distance for approximate string matching. The default value is 0.1. |
typedf |
"main" return a selected columns in from mtsta_distribution "full" return all data |
The function uses approximate string matching with a maximum distance specified by
the max_distance
argument. It searches the mtsta
distribution database for submitted
species names that match the provided names within the given distance. The function then
retrieves distribution information, including the accepted name, distribution region, unsure
distribution (if available), distribution from the World Check-list of Vascular Plants (WCVP),
taxonomic status, and the Levenshtein distance between submitted and matched species names.
A data frame with the following columns:
Character vector with the submitted species names.
Character vector with the matched species names in the database.
Character vector with the accepted names of the matched species.
Character vector with the distribution of the matched species.
Character vector with information about unsure distribution (if available).
Character vector with the distribution from the World Check-list of Vascular Plants (WCVP) database for the matched species.
Character vector indicating the taxonomic status of the matched species.
Numeric vector with the Levenshtein distance between submitted and matched species names.
# Example usage of search_mtsta_distribution function
species_list <- c("Escallonia mirtilloydes", "Ilex rimbachii", "Saurauia lehmannii")
distribution_data <- search_mtsta_distribution(species_list, max_distance = 0.2)
print(distribution_data)