powered by
Turns a factor with several levels into a matrix with several columns composed of zeros and ones.
fact2mat(x)
a vector.
Columns with zeros and ones.
# NOT RUN { x = sample(1:3,100,replace = TRUE) fact2mat(x) # }
Run the code above in your browser using DataLab