This function checks if a list of species names are endemic in the ppendemic database. Endemic species are those that are native and restricted to a specific geographic area, in this case, Peru. The function allows fuzzy matching for species names with a maximum distance threshold to handle potential typos or variations in species names.
Arguments
- splist
A character vector containing the list of species names to be checked for endemism in the ppendemic database.
- max_distance
A numeric value (default is 0.1) specifying the maximum distance for fuzzy matching. It should be a non-negative value.
Value
A character vector indicating if each species is endemic, not endemic, or if it is an endemic species found using fuzzy matching.
Examples
is_ppendemic(c("Aa aurantiaca", "Aa aurantiaaia", "Werneria nubigena"))
#> [1] "Aa aurantiaca is endemic"
#> [2] "Aa aurantiaca is endemic - fuzzy matching"
#> [3] "not endemic"