Learn R Programming

echoice2 (version 0.2.4)

dummyvar: Dummy-code a categorical variable

Description

Dummy-code a categorical variable

Usage

dummyvar(data)

Value

tibble with dummy variables

Arguments

data

one column of categorical data to be dummy-coded

Examples

Run this code
mytest=data.frame(attribute=factor(c('a','a','b','c','c')))
dummyvar(mytest)

Run the code above in your browser using DataLab