View source: R/abbreviate_taxa_names.R
abbreviate_taxa_names | R Documentation |
This function is based on vegan::make.cepnames
(git 1b816c1; Aug 2, 2011).
abbreviate_taxa_names(names, nlet = 3, totl = 7, sep = "_", seconditem = F)
names |
Character vector of species names |
nlet |
Number of letters to take from genus-species parts |
totl |
Number of letters in the final abbreviation |
sep |
Which separator to use for genus-species case (default is underscore) |
seconditem |
Logical, take the second item of the original name for abbreviation |
Character vector of abbreviated taxa names
Author of the original function is Jari Oksanen (make.cepnames
)
make.cepnames
x <- c("Laccaria laccata", "Meliniomyces bicolor",
"Inocybe cincinnata", "Inocybe", "Tylospora asterophora",
"Cadophora finlandica", "Saccharomycetales")
abbreviate_taxa_names(x, nlet = 3, totl = 7, sep = "_")
abbreviate_taxa_names(x, nlet = 4, totl = 8, sep = "") # same as vegan::make.cepnames
vegan::make.cepnames(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.