herpSync: Synchronize species names using synonym reference table

View source: R/herpSync.R

herpSyncR Documentation

Synchronize species names using synonym reference table

Description

Compares a user-provided list of reptile taxon names against a synonym table from The Reptile Database and returns an updated list of valid names. Particularly useful to standardize names before analyses or when integrating heterogeneous taxonomic sources.

Supports interactive disambiguation in cases where multiple valid names are found for a given synonym. Optionally, unmatched names can be retained or returned as blank.

Usage

herpSync(query, synonym, interactive = FALSE, return.no.matches = FALSE)

Arguments

query

A character vector of taxon names to be processed (e.g., species list, phylogenetic tip labels, or trait table entries).

synonym

A data frame with a synonym reference table (e.g., output from herpSynonyms). If not provided, the function uses the internal dataset letsHerp::allSynonyms, which may not be the most up-to-date.

interactive

Logical. If TRUE, the function allows real-time selection when a synonym matches multiple valid names. If FALSE (default), all possible matches are returned as concatenated strings.

return.no.matches

Logical. If TRUE, species not found in the synonym table will be returned as originally provided in the query. If FALSE (default), unmatched entries will be left blank.

Value

A data frame with the following columns:

  • input: original input names from the query.

  • stripped: standardized versions of the input names (e.g., without authors or formatting).

  • status: description of the outcome (e.g., "updated", "not found", "multiple matches").

  • updated: best-matching valid names according to the synonym table.

Note

The internally stored synonym table letsHerp::allSynonyms was last updated on May 23rd, 2025.

References

Liedtke, H. C. (2018). AmphiNom: an amphibian systematics tool. Systematics and Biodiversity, 17(1), 1–6. https://doi.org/10.1080/14772000.2018.1518935

Examples

boa_syn <- letsHerp::allSynonyms[grep("^Boa\\s", allSynonyms$species), ]
query <- c("Vieira-Alencar authoristicus", "Boa atlantica", "Boa diviniloqua", "Boa imperator")
herpSync(query, boa_syn)


letsHerp documentation built on June 23, 2025, 5:09 p.m.