addcol: Add a new column to a data frame and fill with a value.

Description Usage Arguments Value Examples

View source: R/addcol.R

Description

Use to add an identifying column to a data frame. For example, add a column called species and fill the column with the name of the species.

Usage

1
addcol(data, col, value)

Arguments

data

A data frame

col

The column name to add (character, quoted)

value

The value to fill the column with, quoted for character vector.

Value

a data frame

Examples

1
## Not run: df <- addcol(data, "species", "myrtus communis") 

poldham/oldhammisc documentation built on May 25, 2019, 11:23 a.m.