Exports the Arms for a Project

Description

Retrieve a data frame giving the event IDs and event names of a project

Usage

1
2
3
4
5
6
7
exportArms(rcon, arms, ...)

## S3 method for class 'redcapDbConnection'
exportArms(rcon, arms, ...)

## S3 method for class 'redcapApiConnection'
exportArms(rcon, arms, ...)

Arguments

rcon

A REDCap connection object as generated by redcapConnection

arms

A vector of arm numbers that you wish to pull events for (by default, all events are pulled). A bug exists in early versions of the API that causes all arms to be returned regardless of this argument. This bug was fixed in version 5.9.15

...

Arguments to be passed to other methods

Details

The data frame that is returned shows the arm number, and arm name.

When this function is called for a classic project, a character string is returned giving the API error message, '400: You cannot export arms for classic projects' but without casting an error in R. This is by design and allows more flexible error checks in certain functions.

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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])
  >
  > exportArms(rcon)
  arm_num             name
  1       1            Arm 1
  2       2 Experimental Arm
  3      10   Normal Control
  
## End(Not run)