define: Define new columns

Description Usage Arguments Details Value See Also

View source: R/nse.R

Description

Takes a list of column names and creates them. Optionally uses a template to copy across factor/character mappings.

Usage

1
2
3
define(.self, ...)

define_(.self, ..., .dots)

Arguments

.self

Data frame

...

Additional parameters

.dots

Workaround for non-standard evaluation

Details

This function is used to create new columns in a data frame. Specifying just the name will create a new numeric column. If specified in the form of var=template, then a new column named var will be created using template as a template. This is useful for creating new factors.

Value

Data frame

See Also

Other column manipulations: add_rownames, rename, select, undefine


multiplyr documentation built on May 30, 2017, 12:09 a.m.