Read the questionnaire data csv files. Removes the participants that didn't finish or that were excluded. Removes unnecessary columns. Maps ppid using fct replace_redcapid_ppid.

read_quest_raw(rawquestpath, prefix_fn, participants_excluded, redcap_ppid_map)

Arguments

rawquestpath

The path that contains the questionnaires raw data files

prefix_fn

Beginning of the questionnaire file name. Does not have to be exact as it will be matched with the files in the rawquestpath. 3 csv files from Redcap exist: - Ad - Pr - Po

participants_excluded

list of excluded participants id (ppid)

redcap_ppid_map

redcap id (survey_id) to VR id (ppid) map

Value

A data frame with the raw questionnaire data where each row is a participant and each column is a questionnaire item.