namesCompare | R Documentation |
The function cross-references two vectors of species names checking for possible synonyms, misspelled names, and genus-species or species-subspecies correspondence.
namesCompare(vec1,vec2,proportion=0.15)
vec1, vec2 |
a vector of species names. Genus names only are also
allowed. Generic name and specific epithet must be separated by '_'. Note
that |
proportion |
the maximum proportion of different characters between any
|
The function returns a list
including:
$genus if vec1
includes genera names which miss
specific epithet, this object lists all the species in vec2
belonging to each of the genera.
$subspecies if vec1
includes subspecies (i.e. two
epithets after genus name), this object lists species in vec2
possibly corresponding to each of the subspecies.
$epithet lists species with matching epithets as possible synonyms.
$misspelling lists possible misspelled names. For each
proposed mismatched names pair the proportion of characters in the
vec1
differing from the string in vec2
is returned.
Silvia Castiglione, Carmela Serio, Antonella Esposito
## Not run:
names(DataFelids$statefel)->nams
nams[c(19,12,37,80,43)]<-c("Puma_yagouaroundi","Felis_manul","Catopuma",
"Pseudaelurus","Panthera_zdansky")
nams<-nams[-81]
namesCompare(nams,names(DataFelids$statefel))
namesCompare(names(DataFelids$statefel),nams)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.