Learn R Programming

echoice2 (version 0.2.4)

dummify: Create dummy variables within a tibble

Description

Create dummy variables within a tibble

Usage

dummify(dat, sel)

Value

tibble with dummy variables

Arguments

dat

A tibble with the data.

sel

A character vector with the name(s) of the variables to be dummied.

Examples

Run this code
mytest=data.frame(A=factor(c('a','a','b','c','c')), B=1:5)
dummify(mytest,"A")

Run the code above in your browser using DataLab