Description Usage Arguments Value Examples
Transforms a matrix of dummies into a numeric vector.
1 | BinMatrix2Vector(Y_matrix, levels_val = NULL)
|
Y_matrix |
a numeric, factor or character vector. |
levels_val |
levels to be considered, default is NULL for automatic levels. |
A numeric vector
1 2 3 4 5 | Y <- sample(c(1,4,3), size = 100, replace = TRUE)
Y_matrix <- factor2BinMatrix(Y)
BinMatrix2Vector(Y_matrix = Y_matrix)
BinMatrix2Vector(Y_matrix = Y_matrix, levels_val = unique(Y))
BinMatrix2Vector(Y_matrix = Y_matrix, levels_val = c('a', 'e', 'i'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.