contTable | R Documentation |
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.
contTable(x, prop = c("none", "row", "col"), show = FALSE, digits = 3)
x |
A data frame (with two columns) or a table. |
prop |
Indicate whether row ( |
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. |
The contTable
function makes substantial use of the
cat
function.
David Diez
email
, cars93
, possum
,
mariokart
data(email)
table(email[, c("spam", "sent_email")])
contTable(email[, c("spam", "sent_email")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.