to_dummies: Convert column to dummy variables

Description Usage Arguments Value

View source: R/dummies.R

Description

to_dummies converts a column into multiple columns of dummy variables. to_dummies_ is the standard evaluation version of this function.

Usage

1
2
3
to_dummies(.data, col, sep = "_", exclude = NULL)

to_dummies_(.data, col, sep = "_", exclude = NULL)

Arguments

.data

A tbl.

col

In to_dummies, the bare (unquoted) column name. In to_dummies_, a character vector with column name.

sep

The new variable names are constructed from col and the level value separated by sep.

exclude

Ignore these levels of col when creating variables.

Value

A tbl.


jrnold/rubbish documentation built on May 20, 2019, 2:05 a.m.