safe_exportRecords: REDCap Safe Export Records

View source: R/mod_REDCap.R

safe_exportRecordsR Documentation

REDCap Safe Export Records

Description

A safe wrapper around redcapAPI::exportRecords that does not fail when records are requested from an empty REDCap project. In the event of an empty project, field names are used to create an empty data structure.

Usage

safe_exportRecords(rc_con, rc_field_names)

Arguments

rc_con

A REDCap API Connection Object

rc_field_names

The field names for a REDCap instrument

Value

A data frame containing existing REDCap records, or an empty data frame with the structure of what the records would look like.


ReviewR documentation built on Sept. 1, 2023, 5:08 p.m.