rc_read_csv: Imported REDCap csv files and combine into single list.

View source: R/tidy_redcap.R

rc_read_csvR Documentation

Imported REDCap csv files and combine into single list.

Description

Clean raw .csv data exported from a REDCap database, and export a list of data.frames

Usage

rc_read_csv(
  folder,
  yesno = "logical",
  longitudinal = NULL,
  tidy_formats = TRUE
)

Arguments

folder

The folder containing the files downloaded from the REDCap database. The four files required include the Data Dictionary, Events (under the 'Define my events' tab), Instrument Mappings (under the 'Designate Instruments for My Events' tab), and the raw Record data (under the 'My Reports & Exports' tab). All files should be saved as .csv.

yesno

Determine how to return REDCap 'Yes - No' fields; options include 'factor' (default), 'numeric', or 'logical'.

longitudinal

Is the study longitudinal or not. If longitudinal, then event and instrument mapping files should be provided as well.

tidy_format

Tidy variable formats or not?

Value

A named list containing four data frames: dd = metadata, evnt = Events, inst = Instrument mappings, rcrd = Records.


jwilliman/redcapTidy documentation built on Nov. 22, 2023, 7:07 a.m.