Skip to contents

This function is quite specific to a few problems, users might find it lacking in functionality.

Usage

sanitize_labels(
  data,
  sep = " - ",
  multi_sep_replacement = ": ",
  replace_ascii_with_utf = FALSE,
  questions = NULL
)

Arguments

data

data.frame or tibble

sep

String, separates main question from subquestion

multi_sep_replacement

String. If multiple sep are found, replace the first ones with this.

replace_ascii_with_utf

Flag. If TRUE, downloads a list from W3 used to convert html characters as ASCII to UTF8.

questions

Data frame with questions obtained from qualtRics::survey_questions()

Value

Identical data.frame as input, with only variable labels changed.