ffreqtable | R Documentation |
To show the kable output in render() you must add the following chunk option: "results = 'asis'"
ffreqtable( x, varlist = names(x), sumrow = TRUE, out.list = TRUE, out.kable = FALSE, out.csv = FALSE, out.dir = "./", prefix = "", align = "r" )
x |
A data.frame or data.table. |
varlist |
(Optional) Character. A vector of variable names to construct tables for. Defaults to all variables. |
sumrow |
(Optional) Logical. Whether to add a summary row. Defaults to TRUE. |
out.list |
(Optional) Logical. Whether to output the frequency tables as a list. Defaults to TRUE. Returns NULL otherwise. |
out.kable |
(Optional) Logical. Whether to return kable tables. Defaults to FALSE. |
out.csv |
(Optional) Logical. Whether to write CSV files (one per variable) to disk. Defaults to FALSE. |
out.dir |
(Optional) Character. The target directory for writing CSV files. Defaults to the current R working directory. |
prefix |
(Optional) A string to be prefixed to the filename of each CSV file. Default is not to add a string and just to output the variable name as the name of the CSV file. |
align |
(Optional) Alignment of table columns passed to kable. Default is "r". Note that your options passed must work for a five-column layout. |
Returns a list of frequency tables for each variable by default. Different out.* arguments can add CSV and kable output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.