cleansp {divDyn}R Documentation

Cleanse Species Name Vector

Description

This function will take a vector of binomial names with various qualifiers of open nomenclatures, and removes them form the vector entries. Only the the genus and species names will remain.

Usage

cleansp(
  x,
  debug = FALSE,
  collapse = "_",
  subgenera = TRUE,
  misspells = TRUE,
  stems = TRUE
)

Arguments

x

(character): the vector containing species names with qualifiers of open taxonomy.

debug

(logical): FALSE will return the cleaned species name vector, TRUE returns a data table that allows one by one checking.

collapse

(character): This argument will be passed to the paste function's argument of the same name. The character value to be inserted between the genus and species names.

subgenera

(logical): FALSE omits subgenus information (in parentheses) and will construct a unique binomen based on the genus and species names alone. TRUE (default) will promote the subgenus names and it will create a new binomen based on the subgenus rather than the genus name.

misspells

logical: Resolution of common spelling mistakes, such as diphtongs and alternate spellings: 'ue' is replaced with 'u', 'ae' is replaced with 'e', 'll' with 'l', 'ss' with 's'and 'y' with 'i'.

stems

(logical): Setting this to TRUE will omit the adjective declination suffices from the species names.

Details

This version will keep subgenera, and will not assign species to the base genus. The following qualifiers will be omitted: "n.", "sp.", "?", "gen.", "aff.", "cf.", "ex gr.", "subgen.", "spp" and informal species designated with letters. Entries with "informal" and "indet." in them will also be invalidated.

Value

A data.frame or character vector.

Author(s)

Adam T. Kocsis, Gwenn Antell. Adam T. Kocsis wrote the main body of the function, subroutines called by the misspells and stems are the modified work of Gwen Antell.

Examples

examp <- c("Genus cf. species", "Genus spp.", "Family indet.", 
  "Mygenus yourspecies", "Okgenus ? questionsp", 
  "Genus (cf. Subgenus) aff. species")
cleansp(examp) 

[Package divDyn version 0.8.2 Index]