is_binomen: Binomial Names 'is_binomial' tests for valid binomial names,...

View source: R/utils.R

is_binomenR Documentation

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)

Arguments

x

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

Value

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

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

 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)


benthos documentation built on Aug. 22, 2022, 5:07 p.m.