crosstab | R Documentation |
Easy cross-tabulation with labels
crosstab(rows, cols, data, margin = "row", useNA = "always", drop.empty = T)
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? |
## Not run:
crosstab("country", "frequency", wvs6, "row")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.