Export Reports from a REDCap Database

Share:

Description

Exports reports from a REDCap Database and formats data if requested

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
exportReports(rcon, report_id, factors = TRUE, labels = TRUE,
  dates = TRUE, checkboxLabels = FALSE, ...)

## S3 method for class 'redcapDbConnection'
exportReports(rcon, report_id, factors = TRUE,
  labels = TRUE, dates = TRUE, checkboxLabels = FALSE, ...)

## S3 method for class 'redcapApiConnection'
exportReports(rcon, report_id, factors = TRUE,
  labels = TRUE, dates = TRUE, checkboxLabels = FALSE, ..., proj = NULL)

Arguments

rcon

A REDCap connection object as created by redcapConnection.

report_id

Integer. Gives the report id of the desired report. This is located on the Report Builder page of the user interface on REDCap.

factors

Logical. Determines if categorical data from the database is returned as numeric codes or labelled factors.

labels

Logical. Determines if the variable labels are applied to the data frame.

dates

Logical. Determines if date variables are converted to POSIXlt format during the download.

checkboxLabels

Logical. Determines the format of labels in checkbox variables. If FALSE labels are applies as "Unchecked"/"Checked". If TRUE, they are applied as ""/"[field_labe]" where [field_label] is the label assigned to the level in the data dictionary. This option is only available after REDCap version 6.0.

...

Additional arguments to be passed between methods.

proj

A redcapProject object as created by redcapProjectInfo.

Details

A record of exports through the API is recorded in the Logging section of the project.

Reports are exported based on their id number, which can be looked up in the Reports page of a project

Author(s)

Benjamin Nutter