Learn R Programming

rangeBuilder (version 1.6)

synonymMatch: Match synonyms to accepted names

Description

Performs strict and fuzzy matching to return the accepted species name

Usage

synonymMatch(
  x,
  db,
  yearCutoff = NULL,
  searchSynonyms = TRUE,
  fuzzyDist = 2,
  advancedSearch = FALSE,
  returnMultiple = FALSE,
  progressBar = TRUE,
  nthreads = 1
)

Value

a vector of matches, NA if the species name could not be unambiguously matched to a single accepted name. If returnMultiple = TRUE, then NA is only returned when the taxon name is not matched at all in the database.

Arguments

x

a character vector of Genus_species_subspecies (can be multiple)

db

squamates, birds, mammals or amphibians

yearCutoff

year for oldest considered synonyms, please treat as experimental.

searchSynonyms

if FALSE, strict and fuzzy matching is applied only to the list of accepted names

fuzzyDist

for fuzzy searching, the maximum string distance allowed for a match

advancedSearch

logical, should advanced searching be used, see Details.

returnMultiple

if FALSE, NA is returned if no match found or if multiple matches found. if TRUE, then multiple hits are returned.

progressBar

if FALSE, progress bar will be suppressed.

nthreads

number of threads to use for parallelization of the function.

Author

Pascal Title

Details

The order of the procedure applied here is as follows:
First Pass:

  • Strict matching against accepted names,

  • fuzzy matching against accepted names,

  • strict matching against synonyms,

  • fuzzy matching against synonyms,

Second Pass:

  • Same as first pass, but ignoring subspecies

Advanced Search:

  • Same as first pass, but with consideration of alternate latin suffixes and all genus/species combinations.

The squamate database is a local copy of the Reptile Database (http://reptile-database.reptarium.cz/), which will be updated periodically. The list of accepted names within this R package are those that are listed as such on the website.

The bird database is the BirdLife Taxonomic Checklist as downloaded from http://datazone.birdlife.org/species/taxonomy.

The mammal database is Wilson and Reeder's Mammal Species of the World, 3rd edition, downloaded from http://www.departments.bucknell.edu/biology/resources/msw3/, and supplemented with searches of the ITIS database with the taxize R package.

The amphibian database is a local copy of the AmphibiaWeb taxonomy (https://amphibiaweb.org/taxonomy/index.html), which will be updated periodically.

To see when these datasets were last updated for this R package, run downloadDates.

References

HBW and BirdLife International. 2017. Handbook of the Birds of the World and BirdLife International digital checklist of the birds of the world. Version 2 Available at: http://datazone.birdlife.org/userfiles/file/Species/Taxonomy/HBW-BirdLife_Checklist_Version_2.zip

Don E. Wilson and DeeAnn M. Reeder (editors). 2005. Mammal Species of the World. A Taxonomic and Geographic Reference (3rd ed), Johns Hopkins University Press, 2, 142 pp.

Uetz P., Hosek, J. (ed.). 2016. The Reptile Database, http://www.reptile-database.org.

Examples

Run this code
 
# simple misspelling
synonymMatch('Crotalus_atrix', db = 'squamates')

# synonym
synonymMatch('Pipistrellus_macrotis', db = 'mammals')

# synonym with slight misspelling
synonymMatch('Tangara_pulchirrima', db = 'birds')

# no match, but return multiple
synonymMatch('Masticophis_flagellum', db = 'squamates', returnMultiple = TRUE)

Run the code above in your browser using DataLab