repeatingInstrumentMethods | R Documentation |
These methods enable the user to export the existing repeating instrument and event settings, or import new settings to the project.
exportRepeatingInstrumentsEvents(rcon, ...)
importRepeatingInstrumentsEvents(rcon, data, ...)
## S3 method for class 'redcapApiConnection'
exportRepeatingInstrumentsEvents(rcon, ...)
## S3 method for class 'redcapApiConnection'
importRepeatingInstrumentsEvents(rcon, data, ...)
rcon |
A |
data |
|
... |
Arguments to pass to other methods |
Repeating events (as opposed to repeating instruments) are
provided as a row of data where the form_name
column is NA
.
It is not possible to update the has_repeating_instruments_or_events
property of the project through importProjectInformation
.
Enabling of repeating instruments and events must be done through the GUI.
Although the API does not provide a delete method, it is possible to
remove settings by doing an import that excludes the settings that are
to be deleted. All settings can be cleared by executing
importRepeatingInstrumentsEvents(rcon, REDCAP_REPEAT_INSTRUMENT_STRUCTURE)
.
exportRepeatingInstrumentsEvents
returns a data frame with the columns:
event_name | The unique event name. |
form_name | The form name, as given in the second column of the Meta Data |
custom_form_label | A custom display string for the repeating instrument/event |
importRepeatingInstrumentsEvents
invisibly returns the number of rows imported.
exportRepeatingInstrumentsEvents()
: Export repeating instruments and events.
importRepeatingInstrumentsEvents()
: Import repeating instruments and events.
## Not run:
unlockREDCap(connections = c(rcon = "project_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
# Export repeating instruments and events
exportRepeatingInstrumentsEvents(rcon)
# Import repeating instruments and events
NewData <- data.frame(event_name = c("event_1_arm_1",
"event_2_arm_1"),
form_name = c("field_observation",
"self_assessment"),
custom_form_label = c("Instructor led field observation",
"Trainee self assessment"))
importRepeatingInstrumentsEvents(rcon,
data = NewData)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.