Learn R Programming

ppendemic (version 0.2.1)

is_ppendemic: Check if species are endemic in the ppendemic database

Description

This function checks if a list of species names are endemic in the ppendemic database. The function allows fuzzy matching for species names with a maximum distance threshold to handle potential typos or variations in species names.

Usage

is_ppendemic(
  splist,
  max_dist = 2,
  save_ambiguous = FALSE,
  ambiguous_path = "ambiguous_genera.csv"
)

Value

A character vector indicating if each species is endemic or not endemic.

Arguments

splist

A character vector containing the list of species names to be checked for endemic in the ppendemic database.

max_dist

Maximum edit distance used in fuzzy matching steps. Defaults to 2.

save_ambiguous

Logical flag. If TRUE, ambiguous fuzzy genus matches are exported to disk.

ambiguous_path

File path used when save_ambiguous = TRUE. Defaults to "ambiguous_genera.csv".

Examples

Run this code
# \donttest{
is_ppendemic(c("Aa aurantiaca", "Aa aurantiaaia", "Werneria nubigena"))
# }

Run the code above in your browser using DataLab