Skip to contents

qesR provides a merged harmonized dataset through get_qes_master().

Build merged data

library(qesR)

master <- get_qes_master(strict = FALSE)
dim(master)
head(master)

What it harmonizes

Harmonized fields include demographics (age, gender, education, income), vote choice, party identification, sovereignty attitudes, leader thermometers, and more. Use colnames(master) to see the full list.

get_qes_master() also keeps the merge logic explicit:

  • uses cross-study variable maps and value normalization for comparability
  • derives age_group where age or year-of-birth is available
  • retains panel and non-panel respondents as separate observations
  • renames opaque legacy variables (for example q10, q16, voteprec) to readable merged names
  • stores source-variable provenance in attr(master, "source_map")
  • stores the list of added cross-study variables in attr(master, "crossstudy_variables_added")
  • stores old-to-new variable renaming in attr(master, "variable_name_map")

It also records source-variable provenance:

source_map <- attr(master, "source_map")
head(source_map)
name_map <- attr(master, "variable_name_map")
head(name_map)

Quality controls in merge

get_qes_master() applies:

  • respondent de-duplication within the same survey code
  • derived age groups where age or year-of-birth are available
  • removal of rows empty across harmonized variables

Save merged data

get_qes_master(save_path = "qes_master.csv", strict = FALSE)
get_qes_master(save_path = "qes_master.rds", strict = FALSE)