R/get_binomial.R
get_binomial.Rd
Extract the binomial name (Genus + specific epithet + infraspecific epithet (optional)) from a full Scientific Name
get_binomial(species_names,
include_subspecies = TRUE,
include_variety = TRUE)
(character) Scientific names to be converted to binomial names
(logical) include subspecies? If TRUE (default), the function extracts any infraspecific epithet after the pattern "subsp."
(logical) include subspecies? If TRUE (default), the function extracts any infraspecific epithet after the pattern "var."
A vector with the binomial names (Genus + specific epithet).
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
#> [1] "Araucaria angustifolia" "Araucaria angustifolia var. alba"
#> [3] "Butia catarinensis" "Butia eriospatha subsp. punctata"
#> [5] "Adesmia paranensis"