makeStandardTable | R Documentation |
Functions that will return tables used in reports.
mst(
tab,
col_names = colnames(tab),
type = "latex",
cap = "",
label = "",
digs = 0,
align = NULL,
fs = 8,
lsd = FALSE
)
prettyTab(tab, add_totals = FALSE)
tab |
Data frame or matrix represetnting the table |
col_names |
Character vector with column names. Defaults
|
type |
Character string defining output, either 'html' or 'latex'. Default is 'latex' |
cap |
Character string with table caption. Empty string by default |
label |
Character string defining the label in case the table needs to
be referenced elsewhere in the overall document. For instance, setting this
to 'my_table' the corresponding inline rmarkdown reference to use is
|
digs |
Numeric number of digits to use. = by default |
align |
Character vector specifying column alignment in the LaTeX way,
e.g. |
fs |
Numeric providing the font size. Only apply for LaTeX output. Default value is 8 |
lsd |
Logical if table is to be scaled down. Only apply for LaTeX output. FALSE by default |
add_totals |
Logical if a column of sums is to be added to the table. Defaults to FALSE |
mst()
creates RMarkdown code for creating standard tables.
prettyTab()
creates a table with cells containing percentages of
totals and observations optinally with a marginal row count
Character string containing RMarkdown table code or an R data object
mst(tab = mtcars[1:10, ])
prettyTab(tab = as.matrix(mtcars[1:10, ]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.