View source: R/table-cross_table.R
| cross_table | R Documentation |
Generate and Display a Cross Tabulation Table
cross_table(
data,
percentage = NULL,
layout = TRUE,
expected = TRUE,
layout_center = FALSE,
header_underline = FALSE,
digits = NULL,
center_table = FALSE,
style = NULL,
...
)
data |
A matrix or table of observed frequencies. |
percentage |
Which percentages to show. Options: |
layout |
Show layout legend box? Default |
expected |
Show expected frequencies? Default |
layout_center |
Center the layout box? Default |
header_underline |
Shorten the underline beneath the column header? Default |
digits |
Named list with keys |
center_table |
Center entire table in terminal? Default |
style |
Named list supplied using |
... |
Reserved for future use. |
Invisibly returns the formatted cross-tabulation matrix.
cross_table(matrix(c(10, 20, 30, 40), nrow = 2))
cross_table(matrix(c(10, 20, 30, 40), nrow = 2), percentage = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.