Truncation of Species Names

Share:

Description

Delete infraspecific names and epithets form species names.

Usage

1
2
3
strip.spec(x)

strip.infraspec(x, force.underscore = FALSE)

Arguments

x

a character string

force.underscore

logical, if TRUE, white space will be replaced by underscore

Details

strip.spec and strip.infraspec try to guess the separating character used; both " " and "_" are possible.

Value

a character string

Author(s)

Christoph Heibl

Examples

1
2
3
4
5
6
7
8
(name <- "Vipera aspis aspis")
(name2 <- strip.infraspec(name))
(name3 <- strip.spec(name2))

names.set <- c("Vipera aspis aspis",
               "Vipera_aspis_atra")       
sapply(names.set, strip.infraspec)
sapply(names.set, strip.infraspec, force.underscore = TRUE)