get_binomial: Extract the binomial name (Genus + specific epithet +...

View source: R/get_binomial.R

get_binomialR Documentation

Extract the binomial name (Genus + specific epithet + infraspecific epithet (optional)) from a full Scientific Name

Description

Extract the binomial name (Genus + specific epithet + infraspecific epithet (optional)) from a full Scientific Name

Usage

get_binomial(species_names,
                   include_subspecies = TRUE,
                   include_variety = TRUE)

Arguments

species_names

(character) Scientific names to be converted to binomial names

include_subspecies

(logical) include subspecies? If TRUE (default), the function extracts any infraspecific epithet after the pattern "subsp."

include_variety

(logical) include subspecies? If TRUE (default), the function extracts any infraspecific epithet after the pattern "var."

Value

A vector with the binomial names (Genus + specific epithet).

Examples

spp <- c("Araucaria angustifolia (Bertol.) Kuntze",
         "Araucaria angustifolia var. alba Reitz",
         "Butia catarinensis Noblick & Lorenzi",
         "Butia eriospatha subsp. punctata",
         "Adesmia paranensis Burkart")
spp_new <- get_binomial(species_names = spp,
                       include_subspecies = TRUE,
                       include_variety = TRUE)
spp_new


florabr documentation built on Sept. 11, 2024, 9:10 p.m.