dissect_name {taxlist} | R Documentation |
Dissect Scientific Names into their Elements
Description
Depending the degree of resolution and specific roles of nomenclature, strings containing taxon usage names (scientific names) are constructed with different parts. A string with names can be consequently split into those elements, meanwhile the number of elements may suggest the taxonomic ranks.
This function is a wrapper of strsplit()
, while name element can be
re-pasted if indicated in argument repaste
.
Usage
dissect_name(x, split = " ", fixed = TRUE, repaste, ...)
Arguments
x |
A character vector containing taxon names. |
split , fixed , ... |
Arguments passed to |
repaste |
An integer vector indicating the elements of the name selected for the output. |
Value
A character matrix with as many rows as names in the input vector.
If repaste
is indicated, then the output will be a character vector.
Author(s)
Miguel Alvarez kamapu78@gmail.com
See Also
Examples
# A list of variety names
sp_list <- subset(x = Easplist, subset = Level == "variety", slot = "relations")
sp_list <- accepted_name(sp_list)[c(1:10), "TaxonName"]
# split name
dissect_name(sp_list)
# re-paste the two first words (species name)
dissect_name(sp_list, repaste = c(1:2))
[Package taxlist version 0.3.0 Index]