View source: R/tables_univariate.R
univ_perc | R Documentation |
Previously called univ_mr
(for multiple responses) the function make
descriptive statistics (n, percentages) for 0-1 variables
univ_perc(
x,
xname = NULL,
sort_freq = TRUE,
only_non_zero_perc = TRUE,
latex = TRUE,
latex_placement = "ht",
label = NULL,
caption = NULL,
use_comments = TRUE,
wb = NULL,
sheets = NULL
)
x |
a (chunk of) data.frame encoding multiple responses (aka all composed of 0-1 variables) |
sort_freq |
sort by frequencies (descending)? |
only_non_zero_perc |
print only non zero percentages rows |
latex |
output the table using |
latex_placement |
table placement for latex printing |
label |
latex label |
caption |
latex caption |
use_comments |
use comments for row (variable) names, if available |
wb |
an openxlsx Workbook; if not NULL the table will be saved in the workbook too, aside printing |
sheets |
optional sheet names (same length as the number of tables) |
set.seed(1)
data <- as.data.frame(matrix(rbinom(100, 1, p = 0.5), ncol = 10))
univ_perc(x = data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.