Easy cross-tabulation with labels
Usage
crosstab(rows, cols, data, margin = "row", useNA = "always", drop.empty = T)
Arguments
- rows
Character, variable name to put in rows
- cols
Character, variable name to put in columns
- data
Data.frame containing variables
- margin
If any proportions should be computed, might be `row`, `col`, or `none`.
- useNA
How to deal with NAs, passed to `table`.
- drop.empty
Remove empty categories?
Examples
if (FALSE) { # \dontrun{
crosstab("country", "frequency", wvs6, "row")
} # }