topline_freqs: Create all data for a topline

View source: R/topline_freqs.R

topline_freqsR Documentation

Create all data for a topline

Description

Use topline_freqs() to automate all the quantitative frequencies for a topline report. This function works best if your questions have the proper prefixes:

  1. "s_" for single select,

  2. "m_" for multiple select,

  3. "oe_" for open ends,

  4. "n_" for numeric,

  5. "r_" for ranked,

  6. "md_" for max diff.

Usage

topline_freqs(
  dataset,
  weight_var,
  assign_s = NULL,
  assign_m = NULL,
  assign_n = NULL,
  unweighted_ns = TRUE,
  silently = FALSE
)

jarvis_top_us_all_off(
  dataset,
  weight_var,
  assign_s = NULL,
  assign_m = NULL,
  assign_n = NULL,
  unweighted_ns = TRUE,
  silently = FALSE
)

Arguments

dataset

A dataframe for which you want to create a topline

weight_var

Variable containing weights

assign_s

DEFAULT = NULL, A vector of unquoted variables to be treated as single select variables, put within c()

assign_m

DEFAULT = NULL, A vector of unquoted variables to be treated as multiple select variables, put within c()

assign_n

DEFAULT = NULL, A vector of unquoted variables to be treated as numeric variables, put within c()

unweighted_ns

DEFAULT = TRUE, Display weighted or unweighted n-sizes in topline report

silently

DEFAULT = FALSE, Hide message output (e.g., progress of completing freqs on variables or printing of variables not included in the topline)

Value

A tibble of frequencies

Examples

municipal_data %>%
topline_freqs()

municipal_data %>%
  topline_freqs(
    assign_n = c(d_yearborn, Duration__in_seconds_),
    weight_var = weights
)

nick-moffitt/y2municipal documentation built on Dec. 20, 2024, 5:53 a.m.