summarize_chooseany: Summarize a chooseany question

View source: R/summary.R

summarize_chooseanyR Documentation

Summarize a chooseany question

Description

Summarize a chooseany question

Usage

summarize_chooseany(data, question, width = default_width, ...)

Arguments

data

Data frame or tibble with the dataset

question

Which survey question, as a string.

width

Truncates question names that are too long to width

Since this attempts to summarize a choose-any-of-the-options style question (so multiple answers are possible), the function assumes that each answer is a separate column, and that all columns start with the same string (the name of the question), are followed by an underscore, followed by the value of the option. The function uses starts_with() to identify the appropraite set of columns to summarize (which is why question should be a string)


rwash/surveys documentation built on Sept. 18, 2023, 11:31 p.m.