Skip to content

Commit

Permalink
better examples for redcap_event_instruments()
Browse files Browse the repository at this point in the history
starting on @januz's proposal in #482
  • Loading branch information
wibeasley committed May 26, 2023
1 parent 3784ae5 commit 2872c69
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions R/redcap-event-instruments.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,21 @@
#' @examples
#' \dontrun{
#' uri <- "https://bbmc.ouhsc.edu/redcap/api/"
#' token <- "0434F0E9CF53ED0587847AB6E51DE762"
#' ds_event_instrument <- REDCapR::redcap_event_instruments(redcap_uri=uri, token=token)$data
#'
#' # Longitudinal project with one arm
#' token_1 <- "786334BEB4A87D572DD0E99C4BFCE144" # pid 2629
#' REDCapR::redcap_arm_export(redcap_uri=uri, token=token_1)$data
#' REDCapR::redcap_event_instruments(redcap_uri=uri, token=token_1)$data
#'
#' # Project with two arms
#' token_2 <- "0434F0E9CF53ED0587847AB6E51DE762" # pid 212
#' REDCapR::redcap_arm_export(redcap_uri=uri, token=token_2)$data
#' REDCapR::redcap_event_instruments(redcap_uri=uri, token=token_2)$data
#'
#' # Classic project (without arms) throws an error
#' token_3 <- "9A81268476645C4E5F03428B8AC3AA7B" # pid 153
#' REDCapR::redcap_arm_export(redcap_uri=uri, token=token_3)$data
#' # REDCapR::redcap_event_instruments(redcap_uri=uri, token=token_3)$data
#' }

#' @export
Expand Down

0 comments on commit 2872c69

Please sign in to comment.