Adds one or more var_name
s to a combination list.
Arguments
- list
A list as returned by the
combos_*()
functions likecombos_ballot_types()
.- var_names
A character vector of variable names.
See also
Other combination functions:
combos_ballot_types()
,
combos_elections()
,
combos_proposal_arguments()
,
combos_proposal_main_motives()
,
combos_proposals()
Other variable-related functions:
is_skill_question_var()
,
var_lbl()
,
var_lvls()
,
var_proposal_nr()
,
var_skill_question_nr()
,
var_title()
,
var_val_set()
Examples
fokus::combos_proposals(ballot_date = "2023-06-18",
canton = "aargau",
incl_nr = FALSE) |>
fokus::add_vars_to_combos(var_names = c("age_group", "favored_party"))
#> [[1]]
#> [[1]]$ballot_date
#> [1] "2023-06-18"
#>
#> [[1]]$lvl
#> [1] "cantonal"
#>
#> [[1]]$canton
#> [1] "aargau"
#>
#> [[1]]$var_name
#> [1] "age_group"
#>
#>
#> [[2]]
#> [[2]]$ballot_date
#> [1] "2023-06-18"
#>
#> [[2]]$lvl
#> [1] "cantonal"
#>
#> [[2]]$canton
#> [1] "aargau"
#>
#> [[2]]$var_name
#> [1] "favored_party"
#>
#>
#> [[3]]
#> [[3]]$ballot_date
#> [1] "2023-06-18"
#>
#> [[3]]$lvl
#> [1] "federal"
#>
#> [[3]]$canton
#> [1] "aargau"
#>
#> [[3]]$var_name
#> [1] "age_group"
#>
#>
#> [[4]]
#> [[4]]$ballot_date
#> [1] "2023-06-18"
#>
#> [[4]]$lvl
#> [1] "federal"
#>
#> [[4]]$canton
#> [1] "aargau"
#>
#> [[4]]$var_name
#> [1] "favored_party"
#>
#>