Learn R Programming

psycCleaning (version 0.1.1)

dummy_coding: Dummy Coding

Description

Create dummy-coded columns, supporting tidyselect syntax to process multiple columns simultaneously.

Usage

dummy_coding(data, cols)

Value

An object of the same type as .data. The output has the following properties: 1. Columns from .data will be preserved. 2. Columns that are dummy-coded.

Arguments

data

data.frame object

cols

Columns that need to be dummy-coded See `dplyr::dplyr_tidy_select` for available options.

Examples

Run this code
dummy_coding(iris,Species)

Run the code above in your browser using DataLab