Creates a named matrix from two variables.
matrix.cross_table(var1, var2, predefined_levels = NA)matrix with cross-tabulation of var1 and var2.
Character vector. Values representing first variable.
Character vector. Values representing second variable.
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.