Nothing
# Complete documentation in documentation.R
#' @describeIn dagMethods Export Data Access Groups from a REDCap Project
#' @order 1
#' @export
exportDags <- function(rcon, ...){
UseMethod("exportDags")
}
#' @rdname dagMethods
#' @order 4
#' @export
exportDags.redcapApiConnection <- function(rcon,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()){
###################################################################
# Argument Validation ####
coll <- checkmate::makeAssertCollection()
checkmate::assert_class(x = rcon,
classes = "redcapApiConnection",
add = coll)
error_handling <- checkmate::matchArg(x = error_handling,
choices = c("null", "error"),
.var.name = "error_handling",
add = coll)
checkmate::assert_list(x = config,
names = "named",
add = coll)
checkmate::assert_list(x = api_param,
names = "named",
add = coll)
checkmate::reportAssertions(coll)
###################################################################
# Make the API Body list ####
body <- list(content = "dag",
format = "csv",
returnFormat = "csv")
body <- body[lengths(body) > 0]
###################################################################
# Call the API ####
response <- makeApiCall(rcon,
body = c(body, api_param),
config = config)
if (response$status_code != 200) return(redcapError(response, error_handling))
utils::read.csv(text = as.character(response),
na.strings = "",
stringsAsFactors = FALSE)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.