generate: generate a new variable

Description Usage Arguments Value Examples

View source: R/basetools.R

Description

Generate a new variable into the default data.frame. Default data.frame must be set using sedata(df) prior to use generate.

Usage

1
generate(name, value)

Arguments

name

Name of the new variable/column to create

value

The value to assign to the new variable. if it's a logical expression. The new variable will contain TRUE or FALSE according to the evaluation of the logical expression for each row The new variable is added to the original dataset.

Value

The new variable

Examples

1
generate("test", "age/10")

gdesve/epifield documentation built on Jan. 23, 2022, 10:03 a.m.