abbreviate_taxa_names: Abbreviate taxa names

View source: R/abbreviate_taxa_names.R

abbreviate_taxa_namesR Documentation

Abbreviate taxa names

Description

This function is based on vegan::make.cepnames (git 1b816c1; Aug 2, 2011).

Usage

abbreviate_taxa_names(names, nlet = 3, totl = 7, sep = "_", seconditem = F)

Arguments

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

Value

Character vector of abbreviated taxa names

Author(s)

Author of the original function is Jari Oksanen (make.cepnames)

See Also

make.cepnames

Examples

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)


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.