response_options: Get response options

response_optionsR Documentation

Get response options

Description

Returns response options of the specified type and optionally subtype(s) from the raw FOKUS questionnaire data.

Usage

response_options(
  type = all_response_option_types,
  lang = pal::pkg_config_val("lang"),
  subtypes = NULL
)

Arguments

type

Response option type. One of

  • "abstain"

  • "custom"

  • "dunno"

  • "no"

  • "none"

  • "other"

  • "refusal"

  • "unspecific"

  • "yes"

lang

Language. One of "de" or "en".

subtypes

Hierarchical response option subtypes as a character vector, or NULL. If NULL, all subtypes are returned.

Details

Note that only recurring response options are returned which are defined under the response_options top-level key in the file data-raw/questionnaire/questionnaire.toml.

Value

A character vector.

See Also

Other predicate functions: ballot_title(), political_issues(), postal_dispatch_way()

Examples

fokus:::response_options(type = "abstain",
                         lang = "de")

fokus:::response_options(type = "abstain",
                         lang = "de",
                         subtypes = "election")

fokus:::response_options(type = "abstain",
                         lang = "de",
                         subtypes = c("election", "proportional"))

zdaarau/fokus documentation built on Dec. 24, 2024, 10:47 p.m.