Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

exportEvents

Export the Events for a Project


Description

Retrieve a data frame giving the users, expiration dates, and data access privileges for each user.

Usage

exportEvents(rcon, ...)

## S3 method for class 'redcapDbConnection'
exportEvents(rcon, arms = NULL, ...)

## S3 method for class 'redcapApiConnection'
exportEvents(
  rcon,
  arms = NULL,
  ...,
  error_handling = getOption("redcap_error_handling")
)

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

...

Arguments to be passed to other methods.

arms

A numeric vector or arm numbers to retrieve.

error_handling

An option for how to handle errors returned by the API. see redcap_error

Details

It is not sufficient to make the project a longitudinal project. The project must satisfy one of two conditions: 1) have at least two arms and one event defined; or 2) have one arm and at least two events defined. If neither of these conditions are satisfied, the API will return a message such as ERROR: You cannot export arms for classic projects, an error message that isn't as descriptive of the nature of the problem as we might like.

Value

Returns a data frame with six columns

  • event_name The desciptive name of the event.

  • arm_num The arm number in which the event occurs.

  • day_offset The days offset from the first event.

  • offset_min The minimum offset value.

  • offset_max The maximium offset value.

  • unique_event_name A unique event identifying name.

REDCap API Documentation

This function allows you to export the events for a project

NOTE: this only works for longitudinal projects.

REDCap Version

5.8.2+

Known REDCap Limitations

None

Author(s)

Benjamin Nutter

References

Please refer to your institution's API documentation.

Additional details on API parameters are found on the package wiki at https://github.com/nutterb/redcapAPI/wiki/REDCap-API-Parameters


redcapAPI

Interface to 'REDCap'

v2.3
GPL-2
Authors
Benjamin Nutter [aut, ctb, cre], Stephen Lane [ctb], Will Beasley [ctb], Jeffrey Horner [ctb], Will Gray [ctb], Jeremy Stephens [ctb], Marcus Lehr [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.