Export a Project's Supplemental Information

Share:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
redcapProjectInfo(rcon, date = TRUE, label = TRUE, meta_data = TRUE,
  users = TRUE, instruments = TRUE, events = TRUE, arms = TRUE,
  mappings = TRUE, version = TRUE, ...)

## S3 method for class '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 class '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.

Author(s)

Benjamin Nutter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

## End(Not run)