Learn R Programming

redcapAPI (version 2.0)

exportUsers: Export the Users for a Project

Description

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

Usage

exportUsers(rcon, ...)

# S3 method for redcapDbConnection exportUsers(rcon, dates = TRUE, labels = TRUE, ...)

# S3 method for redcapApiConnection exportUsers(rcon, dates = TRUE, labels = TRUE, ..., bundle = getOption("redcap_bundle"), error_handling = getOption("redcap_error_handling"))

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

...

Arguments to be passed to other methods.

dates

Logical. Indicates if the expiration date is converted to a POSIXct object.

labels

Logical. Indicates if the data export and form access rights are converted to factor objects.

bundle

A redcap_bundle object.

error_handling

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

Value

Returns a data frame. The number of columns in the data frame will depend on your version of REDCap.

  • username User name

  • email The user's e-mail address

  • firstname The user's first name

  • lastname The user's last name

  • expiration The expiration date of the user's access to the project

  • data_access_group The data access group the user is assigned to

  • data_export The user's data export rights. 0=no access, 2=De-Identified, 1=Full Data Set

  • mobile_app (6.5.0+) Flag for if the user has permissions for the mobile application

  • mobile_app_download_data (6.5.0+) Flag for if the user may download data from the mobile app

The data frame will have one additional column for each form giving the user's form-level permissions in the project. 0=no access, 2=read only, 1=view records/responses and edit records (survey responses are read-only), 3 = edit survey responses

REDCap API Documentation (6.5.0)

This function allows you to export the users for a project

REDCap Version

5.8.2 (Perhaps earlier)

Known REDCap Limitations

None

Details

For some reason I have yet to identify, some User Tables do not export correctly. In some situations, the fields are all shifted one column to the left and the form names are not always exported. This seems to be more common in projects still in Development mode. I have seen one instance of a project in Production where one user had one more column given than any other user. If you notice this behavior, please report it to me as it may help me narrow down the source of the problem

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