Learn R Programming

MAPLES (version 1.0)

tabx: Prints univariate and bivariate frequency table.

Description

Prints univariate or a bivariate frequency distribution table including marginal distribution and total number of cases.

Usage

tabx(x, y, prow = FALSE, pcol = FALSE, chisq=FALSE )

Arguments

x
a vector which can be interpred as factor.
y
an optional second vector which can be interpreted as factor (columns in the contingency table).
prow
if TRUE it adds a bivariate table containing row percentages.
pcol
if TRUE it adds a bivariate table containing column percentages.
chisq
gives the results for a Chi square test for independence of all factors.

See Also

table, summary.table,

Examples

Run this code
tabx(demogr$sex,demogr$edu,chisq=TRUE)
tabx(demogr$sex,demogr$edu,prow=TRUE,pcol=TRUE)

Run the code above in your browser using DataLab