View source: R/redcap-instrument-repeating.R
| redcap_instrument_repeating | R Documentation |
This method allows you to export a list of the repeated instruments and repeating events for a project. This includes their unique instrument name as seen in the second column of the Data Dictionary, as well as each repeating instrument's corresponding custom repeating instrument label. For longitudinal projects, the unique event name is also returned for each repeating instrument. Additionally, repeating events are returned as separate items, in which the instrument name will be blank/null to indicate that it is a repeating event (rather than a repeating instrument). (Copied from "Export Repeating Instruments and Events" method of REDCap API documentation, v.16.0.4)
redcap_instrument_repeating(
redcap_uri,
token,
verbose = TRUE,
config_options = NULL,
handle_httr = NULL
)
redcap_uri |
The uri/url of the REDCap server typically formatted as "https://server.org/apps/redcap/api/". Required. |
token |
The user-specific string that serves as the password for a project. Required. |
verbose |
A boolean value indicating if |
config_options |
A list of options passed to |
handle_httr |
The value passed to the |
Currently, a list is returned with the following elements,
data: A tibble::tibble() where each row represents one repeating instrument-event
combination in the REDCap project.
success: A boolean value indicating if the operation was apparently
successful.
status_code: The
http status code
of the operation.
outcome_message: A human readable string indicating the operation's
outcome.
elapsed_seconds: The duration of the function.
raw_text: If an operation is NOT successful, the text returned by
REDCap. If an operation is successful, the raw_text is returned as an
empty string to save RAM.
Ezra Porter
The official documentation can be found on the 'API Help Page' and 'API Examples' pages on the REDCap wiki (i.e., https://redcap.vumc.org/community/post.php?id=456 and https://redcap.vumc.org/community/post.php?id=462 ). If you do not have an account for the wiki, please ask your campus REDCap administrator to send you the static material.
## Not run:
uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/"
# Repeating events project
token_1 <- "FEF7A22B52E6B9942AFF7A28C426C871" # "vignette-repeating" test project
token_1 <- "22C3FF1C8B08899FB6F86D91D874A159" # vignette-repeating production
REDCapR::redcap_instrument_repeating(redcap_uri=uri, token=token_1)$data
# Classic project (without repeating instruments) throws an error
token_2 <- "9A068C425B1341D69E83064A2D273A70" # "simple" test project
token_2 <- "9A81268476645C4E5F03428B8AC3AA7B" # "simple" test project production
# Throws an error REDCapR::redcap_instrument_repeating(redcap_uri=uri, token=token_2)$data
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.