Skip to contents

Picks the right value of a certain raw questionnaire key based on ballot date and canton (recursively).

Usage

raw_pick_right(x, key = NULL, ballot_date, canton)

Arguments

x

Questionnaire key. A list object.

key

Questionnaire key name, used to determine the correct default value fallback. A character scalar or NULL. If NULL, no fallback is used (and an error is thrown in case none of the subkeys matches).

ballot_date

FOKUS-covered ballot date. One of

  • "2018-09-23"

  • "2018-11-25"

  • "2019-10-20"

  • "2020-09-27"

  • "2020-10-18"

  • "2021-11-28"

  • "2023-06-18"

  • "2024-10-20"

canton

FOKUS-covered canton name. One of

  • "aargau"

Value

Value of x that corresponds to canton and ballot_date.