multi_summary {surveyexplorer} | R Documentation |
Compute summary statistics for a multiple choice questions
Description
This function generates summary statistics, including frequencies, based on the provided question. It allows for optional grouping and weighting of data.
Usage
multi_summary(
dataset,
question,
group_by = NULL,
subgroups_to_exclude = NULL,
weights = NULL,
na.rm = FALSE
)
Arguments
dataset |
The input dataframe (or tibble) of survey questions |
question |
The columns that contain each of the response options for a question, can be selected by using tidyselect semanatics or providing a vector of column names or numbers |
group_by |
Optional variable to group the analysis. If provided, the frequencies and counts will be calculated within each subgroup. |
subgroups_to_exclude |
Optional vector specifying subgroups to exclude from the analysis. |
weights |
Optional variable containing survey weights. If provided, frequencies and counts will be weighted accordingly. |
na.rm |
Logical indicating whether to remove NA values from |
Value
A data frame containing summary statistics, including frequencies, for the specified question.
See Also
Other multiple-choice questions:
multi_freq()
,
multi_table()