contTable: Generate Contingency Tables for LaTeX

Description Usage Arguments Details Author(s) References See Also Examples

Description

Input a data frame or a table, and the LaTeX output will be returned. Options exist for row and column proportions as well as for showing work.

Usage

1
2
contTable(x, prop = c("none", "row", "col"), 
          show = FALSE, digits = 3)

Arguments

x

A data frame (with two columns) or a table.

prop

Indicate whether row ("r", "R", "row") or column ("c", "C", "col") proportions should be used. The default is to simply print the contingency table.

show

If row or column proportions are specified, indicate whether work should be shown.

digits

The number of digits after the decimal that should be shown for row or column proportions.

Details

The contTable function makes substantial use of the cat function.

Author(s)

David Diez

References

OpenIntro Statistics, openintro.org

See Also

email, cars, possum, marioKart

Examples

1
2
3
data(email)
table(email[,c("spam", "sent_email")])
contTable(email[,c("spam", "sent_email")])

JECheadle/RSOC317L documentation built on May 15, 2019, 4:02 a.m.