Rdocumentation
powered by
Learn R Programming
SOUP (version 1.1)
.dummyze: From Factor To Dummy Variables
Description
Transform a
factor
or a factor-like vector of
character
into a matrix of dichotomous dummy variables
Usage
.dummyze(x)
Arguments
x
factor
,
character
or
integer
to be
dummyzed
Value
a matrix of {-1, 0, 1} of dimension
length(x)
$x$
G
where
G
is the number of levels (distinct values) of the factor (vector)