summarize_cat_cat_data {saros} | R Documentation |
Summarize a survey dataset for use in tables and graphs
Description
Summarize a survey dataset for use in tables and graphs
Usage
summarize_cat_cat_data(
data,
dep = colnames(data),
indep = NULL,
...,
showNA = c("ifany", "always", "never"),
totals = FALSE,
sort_by = ".upper",
data_label = c("percentage_bare", "percentage", "proportion", "count"),
digits = 0,
add_n_to_label = FALSE,
add_n_to_category = FALSE,
hide_label_if_prop_below = 0.01,
data_label_decimal_symbol = ".",
categories_treated_as_na = NULL,
label_separator = NULL,
descend = FALSE,
variables_always_at_bottom = NULL,
variables_always_at_top = NULL,
translations = list(),
call = rlang::caller_env()
)
Arguments
data |
Your data.frame/tibble or srvyr-object (experimental)
The data to be used for plotting. |
dep , indep |
Variable selections < Columns in |
... |
Dynamic dots Arguments forwarded to the corresponding functions that create the elements. |
showNA |
Show NA categories
Choose whether to show NA categories in the results. |
totals |
Include totals
Whether to include totals in the output. |
sort_by |
What to sort output by
Sort output (and collapse if requested). When using
|
data_label |
Data label
One of "proportion", "percentage", "percentage_bare", "count", "mean", or "median". |
digits |
Decimal places
Number of decimal places. |
add_n_to_label |
Add N= to the variable label
For some plots and tables it is useful to attach the |
add_n_to_category |
Add N= to the category
For some plots and tables it is useful to attach the |
hide_label_if_prop_below |
Hide label threshold
Whether to hide label if below this value. |
data_label_decimal_symbol |
Decimal symbol
Decimal marker, some might prefer a comma ',' or something else entirely. |
categories_treated_as_na |
NA categories
Categories that should be treated as NA. |
label_separator |
How to separate main question from sub-question
Separator for main question from sub-question. |
descend |
Sorting order
Reverse sorting of |
variables_always_at_top , variables_always_at_bottom |
Top/bottom variables
Column names in |
translations |
Localize your output
A list of translations where the name is the code and the value is the translation. See the examples. |
call |
Internal call
Both the absolute and relative folderpaths are required, as strings. |
Value
Dataset