Transforms an Integer Variable into a Binary Variable
Integer2Binary(y, name = "My_Factor")
y
: Vector with the factorname
: name of the factorTransforms an Integer vector into a Binary Indicator Matrix
A Binary Data Matrix
Jose Luis Vicente-Villardon
dat=c(1, 2, 2, 4, 1, 1, 4, 2, 4) Integer2Binary(dat,"Myfactor")
Useful links