redcap_process_data: Pre-processing data exported from REDCap for use in R

View source: R/redcap_process_data.R

redcap_process_dataR Documentation

Pre-processing data exported from REDCap for use in R

Description

This function is designed to apply basic routine cleaning procedures to a .csv file extracted from REDCap with an accompanying R script without manual specification and coding. This includes removing the duplicate ".factor" variables from the dataset while retaining the REDCap-supplied variable labels. Returns a cleaned dataframe object.

Usage

redcap_process_data(
  folder_name_with_redcap_files = "data",
  redcap_data_file_name = "data-file-name.csv",
  redcap_r_script_name = "r-script-name.R",
  create_combined_factor_variables = TRUE
)

Arguments

folder_name_with_redcap_files

= the name of the folder containing both the REDCap data file and the REDCap R script (which should be under the current project's directory)

redcap_data_file_name

= the name of the REDCap data file, including the ".csv" file type

redcap_r_script_name

= the name of the REDCap R script file, including the ".R" file type

create_combined_factor_variables

= TRUE/FALSE as to whether or not variables with similar names should be combined into a single overall variable if the sub-variables are found to be mutually exclusive


UKBiostatCIRCL/UK-Biostat-CIRCL documentation built on June 30, 2022, 4:42 a.m.