ncat | R Documentation |
This function returns the number of factor in each column of a categorical matrix.
ncat(Xcat_input)
Xcat_input |
A matrix of integers that contains categorical vector in each column. |
A row vector that contains the number of categories in each column.
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)
ncat(Xcat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.