redcap_data_out {BiostatsUHNplus} | R Documentation |
Combines exported REDCap raw and label .csv files together with data dictionary. Tranforms the exported data into Excel sheets by survey instrument with one row per participant
redcap_data_out(
protocol,
pullDate = NULL,
subjID,
subjID_ineligText = NULL,
subjID_eligPattern = NULL,
varFilter = NULL,
varFilter_eligPattern = NULL,
setWD_files,
setWD_dataDict = NULL,
outDir
)
protocol |
study protocol name (i.e. Example_Study) |
pullDate |
date of data pull, for example, 2024_01_02 (if provided) |
subjID |
key identifier field(s) for participant ID in data sets |
subjID_ineligText |
character text that denotes participant IDs to exclude using first key identifier field. For example, c("New Subject") (if provided) |
subjID_eligPattern |
character text that denotes pattern for participant IDs to include using first key identifier field. For example, c("^Site_A") (if provided) |
varFilter |
field to use for filtering data (if provided) |
varFilter_eligPattern |
character text that denotes pattern for filter variable to include, for example, c("^Arm_A") (if provided) |
setWD_files |
directory where the both raw and label REDCap export .csv files are stored, following the convention for file names of 1_DATA.csv, 1_DATA_LABELs.csv, 2_DATA.csv, 2_DATA_LABELs.csv, etc |
setWD_dataDict |
directory where the REDCap .csv data dictionary is stored. Make sure that file is saved as basic .csv file in Excel, and not UTF-8. Must contain "DataDictionary" in file name (if provided) |
outDir |
output directory where the Excel files are saved |
two Excel files, one containing variable names and labels and the other containing REDCap survey instrument data by sheet
## Not run:
redcap_data_out(protocol="Example_Study",pullDate="2024_01_03",
## End(Not run)