Description Usage Arguments Value Author(s) Examples
Output well-formatted cross tabulation. Also can genarate latex syntax of cross tabulation.
1 2 3 | crossTable(..., deparse.level = 2)
## S3 method for class 'CrossTable'
summary(object, digits=3, latex=FALSE, ...)
|
deparse.level |
passed to |
... |
passed to |
object |
crossTable object |
digits |
integer, used for number formatting |
latex |
logical, generate latex syntax if |
crossTable
returns a object which belongs to CrossTable class and table class.
Masahiro Hayashi
1 2 3 4 5 6 7 8 9 10 11 | sex <- factor(rbinom(1:1000, 1, 0.5), labels=c("male" , "female"))
age <- factor(rbinom(1:1000, 2, 0.4), labels=c("young", "middle", "old"))
weight <- factor(rbinom(1:1000, 2, 0.6), labels=c("light", "middle", "heavy"))
cross.table1 <- crossTable(sex, age)
summary(cross.table1)
cross.table2 <- crossTable(sex, age, weight)
summary(cross.table2)
summary(cross.table2, latex = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.