Description Usage Arguments Value
View source: R/survey_collapse.R
'survey_collapse' uses the srvyr [srvyr::survey_mean] & survey package [survey::svymean] methods to collapse/or aggregate survey data. This function uses 'survey_collapse_categorical_long' and 'survey_collapse_binary_long' to perform the batch analysis
1 | survey_collapse(df, vars_to_analyze, disag = NULL, na_val, sm_sep = "/")
|
df |
a survey or preferably srvyr object |
vars_to_analyze |
columns to collapse |
disag |
the columns to collapse/ subset by(analagous to [[dplyr::group_by]] to [[dplyr::summarise]]) flow |
na_val |
if you want NA replaced by value. By default NA values will be removed prior to aggregation. It is recommended that you do not adjust this value and deal with na values as a separate step |
sm_sep |
select multiple parent child separator. This is specific for XLSForm data (default = /). If using read_csv to read in data the separator will most likely be '/' where as if using read.csv it will likely be '.' |
a long format data frame containing the collapsed data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.