disjMatrix | R Documentation |
This function transforms a categorical matrix into a matrix of indicators variables.
disjMatrix(strata_input)
strata_input |
A matrix of integers that contains categorical vector in each column. |
A matrix of indicators.
Xcat <- matrix(c(sample(x = 1:6, size = 100, replace = TRUE),
sample(x = 1:6, size = 100, replace = TRUE),
sample(x = 1:6, size = 100, replace = TRUE)),ncol = 3)
disjMatrix(Xcat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.