herpSynonyms: Retrieve Synonyms for Reptile Species from RDB

View source: R/herpSynonyms.R

herpSynonymsR Documentation

Retrieve Synonyms for Reptile Species from RDB

Description

Retrieves a data frame containing the current valid names of reptile species along with all their recognized synonyms, as listed in The Reptile Database (RDB). Optionally, the references citing each synonym can also be included.

Usage

herpSynonyms(x,
                    getRef = FALSE,
                    showProgress = TRUE,
                    checkpoint = NULL,
                    backup_file = NULL,
                    resume = FALSE,
                    cores = max(1, parallel::detectCores() - 1))

Arguments

x

A data frame with columns species and url, typically the output of herpSpecies with getLink = TRUE.

getRef

Logical. If TRUE, includes the reference(s) in which each synonym was mentioned. Default is FALSE.

showProgress

Logical. If TRUE, prints data sampling progress. Default is TRUE.

checkpoint

Optional. Integer specifying the number of species to process before saving a temporary backup. Backup is only saved if cores = 1. If set to 1, saves progress after each species (safest but slowest).

backup_file

Optional. Character string specifying the path to an .rds file used to save or resume intermediate results. Required if using checkpoint or resume.

resume

Logical. If TRUE, resumes sampling from a previous run using the file provided in backup_file. Only works when cores = 1.

cores

Integer. Number of CPU cores to use for parallel processing. Default is one less than the total available cores.

Value

A data frame with columns:

  • species: The valid species name according to RDB.

  • synonym: A recognized synonym for the species.

  • reference (optional): If getRef = TRUE, the citation where the synonym was reported.

Note

To enable safe resuming or backup progress saving, set cores = 1. Parallel processing does not support backups.

References

Uetz, P., Freed, P., Aguilar, R., Reyes, F., Kudera, J., & Hošek, J. (eds.) (2025). The Reptile Database. Retrieved from http://www.reptile-database.org Liedtke, H. C. (2018). AmphiNom: an amphibian systematics tool. Systematics and Biodiversity, 17(1), 1–6. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/14772000.2018.1518935")}

See Also

herpSpecies, herpAdvancedSearch

Examples

# Filter species belonging to genus Boa
boa <- letsHerp::allReptiles[grep("^Boa\\s", letsHerp::allReptiles$species), ]


# Retrieve synonyms (without references)
boa_syn <- herpSynonyms(boa, getRef = FALSE, cores = 2)



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