Description Usage Arguments Value Examples
Generates cross-tabulation of dependent and indendent variables, also creates a mosiac plot. Makes use of the crosstab function in the descr package.
1 2 3 4 5 6 7 8 9 10 11 |
data |
Dataset (like gss, nes, states, or world) |
y |
Dependent variable |
x |
Independent variable |
w |
Weights (optional) |
ylab |
Y-axis label (optional) |
xlab |
X-axis label (optional) |
main |
Main label for plot (optional) |
digits |
Number of digits to report after decimal place, optional (default = 2) |
chisq |
Do you want Chi-Squared test reported? (default is FALSE) |
A data frame of the cross tabulation results
1 2 3 |
Cell Contents
|-------------------------|
| Count |
| Column Percent |
|-------------------------|
=============================================
attend3
grass Low Moderate High Total
---------------------------------------------
LEGAL 326 149 100 575
62.3% 45.8% 26.7%
---------------------------------------------
NOT LEGAL 197 176 275 648
37.7% 54.2% 73.3%
---------------------------------------------
Total 523 325 375 1223
42.8% 26.6% 30.7%
=============================================
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.