var_prcd: Determine variable's election procedure

var_prcdR Documentation

Determine variable's election procedure

Description

Determines the election procedure each variable corresponds to. In case no election procedure could be determined for a variable, NA_character is returned.

Usage

var_prcd(var_names)

Arguments

var_names

A character vector of FOKUS variable names.

Details

Note that the determination is performed by simply parsing var_names.

Value

A character vector of the same length as var_names.

See Also

Other variable-related functions: add_vars_to_combos(), is_skill_question_var(), var_election_nr(), var_lbl(), var_lvls(), var_proposal_nr(), var_skill_question_nr(), var_title(), var_val_set()

Examples

fokus::qstnrs |>
  dplyr::mutate(prcd = fokus::var_prcd(variable_name)) |>
  dplyr::filter(!is.na(prcd)) |>
  dplyr::select(variable_name, prcd) |>
  unique()

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