View source: R/functions_analysis.r
indicator | R Documentation |
Creates an indicator matrix from a data.frame with the categories of the questions as columns and individuals as rows.
indicator(x, id = NULL, ps = ": ")
x |
a data.frame of factors |
id |
a vector defining the labels for the individuals. If id = NULL row number is used. |
ps |
the seperator used in the creation of the names of the columns. |
Returns a indicator matrix
soc.mca
a <- rep(c("A","B"), 5)
b <- rep(c("C", "D"), 5)
indicator(data.frame(a,b))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.