Learn R Programming

redcapAPI (version 1.3)

redcapProjectInfo: Export a Project's Supplemental Information

Description

The meta data, users, arms, events, mappings, and REDCap version can be used to do some validation during data exports and imports. In order to reduce calls to the API, these tables can be stored in an object and referenced as needed.

Usage

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

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

# S3 method for redcapApiConnection redcapProjectInfo(rcon, date = TRUE, label = TRUE, meta_data = TRUE, users = TRUE, instruments = TRUE, events = TRUE, arms = TRUE, mappings = TRUE, version = TRUE, ..., v.number = "")

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 labelled 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

v.number

Character string. Can be used to manually set the REDCap version number for users running a version earlier than 6.0. This is used to validate calls that may only be available in certain versions.

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.

Examples

Run this code
# NOT RUN {
> #*** Note: I cannot provide working examples without
> #*** compromising security.  Instead, I will try to
> #*** offer up sample code with the matching results
>
>
> #*** Create the connection object
> rcon <- redcapConnection(url=[YOUR_REDCAP_URL], token=[API_TOKEN])
>
> redcapProjectInfo(rcon)
# }

Run the code above in your browser using DataLab