Description Usage Arguments Value Author(s) Examples
Converts a factor into a binary matrix with as many columns as categories of the factor.
1 | FactorToBinary(y, Name = NULL)
|
y |
A factor. |
Name |
Name to use in the final matrix. |
An indicator binary matrix.
Jose Luis Vicente-Villardon
1 2 | y=factor(c(1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1))
FactorToBinary(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.