matrix.cross_table | R Documentation |
Creates a named matrix from two variables.
matrix.cross_table(var1, var2, predefined_levels = NA)
var1 |
Character vector. Values representing first variable. |
var2 |
Character vector. Values representing second variable. |
predefined_levels |
Character vector. Levels for var1 and var2. If omitted, the variables just coded according to the levels they have. If contains vector, the variables are coded according to predefined_levels values, the latter could be useful if var1 and var2 contain not all levels of interest |
Creates a named matrix from two variables.
matrix with cross-tabulation of var1 and var2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.