fact2mat {ZIprop} | R Documentation |
Turn factor into multiple column
Description
Turns a factor with several levels into a matrix with several columns composed of zeros and ones.
Usage
fact2mat(x)
Arguments
x |
a vector. |
Value
Columns with zeros and ones.
Examples
x = sample(1:3,100,replace = TRUE)
fact2mat(x)
[Package ZIprop version 0.1.1 Index]