percent.table {sur} | R Documentation |
Percentage Table
Description
For one variable, returns a frequency distribution table given in percentages. For two variables, returns a contingency table given in percentages.
Usage
percent.table(x, y = NULL)
Arguments
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 |
Value
A table of frequency percentages (for one variable) or a contingency table of percentages (for two variables).
See Also
Examples
# frequency table for one variable
percent.table(NELS$region)
# cross-tabulation for two variables
percent.table(Wages$south,Wages$occup)
[Package sur version 1.0.4 Index]