make_dummy: Make Dummy Variables from a Factor

Description Usage Arguments Examples

View source: R/misc.R

Description

This functions converts a single factor into dummy variables, with one dummy variable for each level of that factor. Names are constructed as <varName>_<level>.

Usage

1

Arguments

x

an object coercable to factor.

Examples

1
2
x <- factor( rep( c("a", "b", "c", "d"), each=25 ) )
make_dummy(x)

kevinushey/Kmisc documentation built on May 20, 2019, 9:08 a.m.