Skip to contents

This function performs approximate (fuzzy) matching of species names from a given list of input terms against the species names in the reptile database, and indicates whether each matched species has subspecies.

Usage

reptiledbr_partial(species_names, max_dist = 2)

Arguments

species_names

Character vector. One or more scientific names or fragments to match approximately.

max_dist

Maximum string distance allowed for a match (default: 2).

Value

A tibble with matched species, taxonomic info, fuzzy match flag, and subspecies presence. The response variable may return different messages depending on the outcome of the query. Possible values include:

  • "Species not found" – The specified species could not be matched in the database.

  • "Species has subspecies" – The specified species exists and has one or more subspecies registered.

  • "No subspecies found" – The species was found, but there are no subspecies associated with it in the database.

Examples

reptiledbr_partial(c("Ablepharus alaicuss", "Anolis limom"))
#> # A tibble: 2 × 11
#>      id input_name         found species_match order family genus epithet author
#>   <int> <chr>              <lgl> <chr>         <fct> <fct>  <fct> <fct>   <chr> 
#> 1     1 Ablepharus alaicu… TRUE  Ablepharus a… Saur… Scinc… Able… alaicus Elpat…
#> 2     2 Anolis limom       TRUE  Anolis limon  Saur… Anoli… Anol… limon   Velas…
#> # ℹ 2 more variables: fuzzy_match <lgl>, message <chr>