Learn R Programming

redcapAPI (version 2.8.0)

exportBundle: Perform a bundle of API calls.

Description

This function is deprecated and will be removed with the release of redcapAPI 3.0.0. It's functionality is built into caching of data onto the redcapConnection object.

Several of the API calls return objects that can be used to perform various validations in exportRecords, exportReports, and other methods. Using an export bundle allows the user to call these methods once and store the result instead of issuing an additional call to the API each time a method is invoked.

For example, if the user is uploading several files to the API, without an export bundle, importFiles will utilize the exportMetaData on each call in order to perform validations. Using a bundle allows the user to download the meta data once and refer to it on every subsequent call that requires the data dictionary.

Usage

exportBundle(
  rcon,
  date = TRUE,
  label = TRUE,
  meta_data = TRUE,
  users = TRUE,
  instruments = TRUE,
  events = TRUE,
  arms = TRUE,
  mappings = TRUE,
  version = TRUE,
  ...
)

# S3 method for redcapApiConnection exportBundle( rcon, date = TRUE, label = TRUE, meta_data = TRUE, users = TRUE, instruments = TRUE, events = TRUE, arms = TRUE, mappings = TRUE, version = TRUE, ..., return_object = TRUE )

Arguments

rcon

A REDCap connection object as generated by redcapConnection

date

Logical. If TRUE, user expiration dates are converted to POSIXct objects.

label

Logical. If TRUE, the user form permissions are converted to labeled factors.

meta_data

Logical. Indicates if the meta data (data dictionary) should be exported.

users

Logical. Indicates if the users table should be exported.

instruments

Logical. Indicates if the instruments table should be exported.

events

Logical. Indicates if the event names should be exported.

arms

Logical. Indicates if the arms table should be exported.

mappings

Logical. Indicates if the form-event mappings should be exported.

version

Indicates if the REDCap version number should be exported. Only applicable in REDCap 6.0.0 and higher.

...

Arguments to be passed to other methods

return_object

Logical. When TRUE, the exportBundle object is returned to the workspace.

Details

The project information is stored in the option redcap_project_info. If the project is not longitudinal, the events, arms, and event-form mappings elements will be assigned character vectors instead of data frames.