Corrects species binomial name case.

to_binomial_name(x)

Arguments

x

a character vector with misspelled binomial names.

Value

A character vector of same length as x.

Examples

x <- c("sAlMO saLAR (Linnee, 1765)", "tyranosurus_REX rex.1")
to_binomial_name(x)
#> [1] "Salmo salar"         "Tyranosurus rex rex"