
Creates a named matrix from two variables.
matrix.cross_table.Rd
Creates a named matrix from two variables.
Arguments
- 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