Description Usage Arguments Examples
Convert a matrix, dataframe or vector into a factor representation. Each column is going to be separately converted into a factor.
1 |
x |
the input vector, data.frame or matrix |
1 2 3 4 5 | # works on vectors, matrices and data frames
convertToFactor(0)
convertToFactor(c(1, 0, 0, 1, 0))
convertToFactor(matrix(c(1,0), nrow=2, ncol=2))
convertToFactor(data.frame("a"=c(1,0), "b"=c(0,1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.