Learn R Programming

peruflorads43 (version 0.2.3)

fuzzy_match_species_within_genus: Fuzzy Match Species within Genus

Description

This function attempts to fuzzy match species names within a genus to the threatened species database using fuzzyjoin::stringdist for fuzzy matching.

Usage

fuzzy_match_species_within_genus(df, target_df = NULL)

Value

A tibble with an additional logical column fuzzy_match_species_within_genus, indicating whether the specific epithet was successfully fuzzy matched within the matched genus (`TRUE`) or not (`FALSE`).

Arguments

df

A tibble containing the species data to be matched.

target_df

A tibble representing the threatened species database containing the reference list of threatened species.

Details

If multiple species match with the same string distance (ambiguous matches), a warning is issued and the first match is automatically selected. To examine ambiguous matches in detail, use get_ambiguous_matches on the result object with type = "species".

**IMPROVED**: Ambiguous match attributes now include threat category and accepted names for better decision-making.

See Also

get_ambiguous_matches to retrieve ambiguous match details