powered by
Dummy-code a categorical variable
dummyvar(data)
tibble with dummy variables
one column of categorical data to be dummy-coded
mytest=data.frame(attribute=factor(c('a','a','b','c','c'))) dummyvar(mytest)
Run the code above in your browser using DataLab