Description Usage Arguments Value See Also Examples
View source: R/percent.table.R
For one variable, returns a frequency distribution table given in percentages. For two variables, returns a contingency table given in percentages.
1 | percent.table(x, y = NULL)
|
x |
object containing data for a single variable. |
y |
optional second object to create a contingency table given in percentages. Default setting ignores second object by setting |
A table of frequency percentages (for one variable) or a contingency table of percentages (for two variables).
1 2 3 4 5 | # frequency table for one variable
percent.table(NELS$region)
# cross-tabulation for two variables
percent.table(Wages$south,Wages$occup)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.