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, 20))

example_dat2 <- make_sppcode(example_dat, "Latin_Name")
head(example_dat2)

KateMMiller/testpackage3 documentation built on Jan. 17, 2022, 12:24 a.m.