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)

Kmisc documentation built on May 29, 2017, 1:43 p.m.

Related to make_dummy in Kmisc...