sur (version 1.0.0)

percent.table: 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 y = NULL.

Value

A table of frequency percentages (for one variable) or a contingency table of percentages (for two variables).

See Also

cumulative.table, table

Examples

Run this code
# NOT RUN {
# frequency table for one variable
percent.table(NELS$region)

# cross-tabulation for two variables
percent.table(Wages$south,Wages$occup)
# }

Run the code above in your browser using DataCamp Workspace