Learn R Programming

redcapAPI (version 2.7.4)

exportArms: Export the Arms for a Project

Description

This function allows you to export the Arms for a project Note: this only works for longitudinal projects

Usage

exportArms(rcon, ...)

# S3 method for redcapApiConnection exportArms( rcon, arms = character(0), ..., error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Value

Returns a data frame with two columns

  • arm_num The arm number

  • name The arm's descriptive name

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

...

Arguments to be passed to other methods.

arms

character identifying the arm numbers to retrieve. May also be integerish.

error_handling

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

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

list Additional API parameters to pass into the body of the API call. This provides users to execute calls with options that may not otherwise be supported by redcapAPI.

REDCap API Documentation

This function allows you to export the Arms for a project

NOTE: this only works for longitudinal projects.

REDCap Version

5.8.2+

Author

Benjamin Nutter

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 in each arm; 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.

If the project information reports that the project is not longitudinal, a data frame with 0 rows is returned without calling the API.

References

Please refer to your institution's API documentation.

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