Skip to content

Instantly share code, notes, and snippets.

View nutterb's full-sized avatar

Benjamin nutterb

  • Battelle Memorial Institute
  • Kentucky
View GitHub Profile
@nutterb
nutterb / filerepo_example.R
Last active March 21, 2023 16:00 — forked from couthcommander/filerepo_example.R
fileRepository API functionality
library(redcapAPI)
key <- ''
rcon <- redcapConnection("https://redcap.vanderbilt.edu/api/", key, conn, 'MatchedRandomization1')
fr_ls <- function(rcon, folder_id = NA, recursive = FALSE) {
args <- list(content = 'fileRepository', action = 'list', format = 'csv')
if(!is.na(folder_id)) {
args$folder_id <- folder_id
parent <- folder_id