make_sppcode: make_sppcode

Description Usage Arguments Value Examples

View source: R/make_sppcode.r

Description

Make a 6-letter code with first 3 letters of genus and species

Usage

1
make_sppcode(data, sppname)

Arguments

data

Name of data frame that contains at least one column with Latin names

sppname

Quoted name of the column that contains the Latin names

Value

Returns a data frame with a new column named sppcode.

Examples

1
2
3
4
5
6
7
example_dat <- data.frame(Latin_Name = c("Carex limosa", "Arethusa bulbosa",
     "Malaxis unifolia", "Calopogon tuberosus"),
cover = c(10, 40, 10, 50),
stems = c(50, 20, 10, 10))
head(example_dat)
example_dat2 <- make_sppcode(example_dat, "Latin_Name")
head(example_dat2)

lukegommermann/testpackage documentation built on Feb. 14, 2022, 12:48 a.m.