data_raw/scoring_maps_generator.R

labels <- c("CCM", "MHE", "SCA", "SCS", "SCA_short", "SCS_short")
scoring_maps <-
  map(labels, function(questionnaire) {
  read.csv(file = stringr::str_interp("data_raw/scoring_maps/${questionnaire}_scoring_map.csv"),
           header = FALSE,
           sep = ";") %>% select(raw = V3, score = V2) %>%
      tibble::as_tibble()
  })
names(scoring_maps) <- labels

usethis::use_data(scoring_maps, overwrite = TRUE)
fmhoeger/psyquest documentation built on Jan. 27, 2021, 7:05 p.m.