Skip to contents

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".

subtypes

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

Value

A character vector.

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.

See also

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

Examples

fokus:::response_options(type = "abstain",
                         lang = "de")
#> [1] "niemanden (leer eingelegt oder nicht teilgenommen)" "keine (leer eingelegt oder nicht teilgenommen)"    
#> [3] "leer eingelegt/nicht abgestimmt"                    "nicht teilgenommen oder leer eingelegt"            

fokus:::response_options(type = "abstain",
                         lang = "de",
                         subtypes = "election")
#> [1] "niemanden (leer eingelegt oder nicht teilgenommen)" "keine (leer eingelegt oder nicht teilgenommen)"    

fokus:::response_options(type = "abstain",
                         lang = "de",
                         subtypes = c("election", "proportional"))
#> [1] "keine (leer eingelegt oder nicht teilgenommen)"