This function matches species names (submitted_name) from the input dataframe directly to the IUCN species list.
It identifies matches and non-matches based on exact string comparison, and returns a dataframe with match status
and relevant columns.
Value
A dataframe that includes:
submitted_name: Original species names from the input.matched_genus: The genus matched from the input.matched_species: The species name matched directly in the IUCN dataset.direct_match_species: Boolean indicating whether the species was directly matched (TRUE) or not (FALSE).
Examples
df <- filter_iucn_genus("Panthera uncia")
#>
#> ── Matching names to IUCN genus list ───────────────────────────────────────────
#> ✔ All input genera were matched successfully (1 exact, 0 fuzzy).
species_direct_match(df)
#> # A tibble: 1 × 7
#> id submitted_name matched_genus matched_species direct_match_species
#> <int> <chr> <chr> <chr> <lgl>
#> 1 1 Panthera uncia Panthera Panthera uncia TRUE
#> # ℹ 2 more variables: direct_match_genus <lgl>, fuzzy_match_genus <lgl>