powered by
Transforms an Integer Variable into a Binary Variable
Integer2Binary(y, name = "My_Factor")
A Binary Data Matrix
Vector with the factor
name of the factor
Jose Luis Vicente-Villardon
Transforms an Integer vector into a Binary Indicator Matrix
dat=c(1, 2, 2, 4, 1, 1, 4, 2, 4) Integer2Binary(dat,"Myfactor")
Run the code above in your browser using DataLab