Learn R Programming

benthos (version 1.3-8)

is_binomen: Binomial Names is_binomial tests for valid binomial names, generic_name extracts the genus to which the species belongs, specific_name extracts the species within the genus.

Description

Binomial Names

is_binomial tests for valid binomial names, generic_name extracts the genus to which the species belongs, specific_name extracts the species within the genus.

Usage

is_binomen(x)

generic_name(x)

specific_name(x)

strip_sp(x)

Value

character vector with either the generic name or the specific name of the species.

Arguments

x

character vector, containing the binomial name(s) of species (a.k.a. binomen or scientific name)

Functions

  • generic_name(): extracts the genus to which the species belongs

  • specific_name(): extracts the species within the genus

  • strip_sp(): strips postfix sp. or spp. from a binomen

Examples

Run this code
 is_binomen("Venerupis corrugata") # TRUE
 generic_name("Venerupis corrugata") # Venerupis
 specific_name("Venerupis corrugata") # corrugata
 generic_name("venerupis corrugata") # NA (genus part should be capitalized)

Run the code above in your browser using DataLab