From 784fded9c1b7266f40eb0ed3954cb39dd983afb1 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 9 Jul 2023 17:34:57 -0500 Subject: [PATCH] sections for `redcap_read()` doc ref #493 --- R/redcap-read.R | 7 ++++++- man/redcap_read.Rd | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/R/redcap-read.R b/R/redcap-read.R index 85ff774e..10235412 100644 --- a/R/redcap-read.R +++ b/R/redcap-read.R @@ -118,7 +118,8 @@ #' a zero-row tibble is returned. #' Currently the empty tibble has zero columns, but that may change in the future. #' -#' @details +#' @section Batching subsets of data: +#' #' [redcap_read()] internally uses multiple calls to [redcap_read_oneshot()] #' to select and return data. Initially, only the primary key is queried #' through the REDCap API. The long list is then subsetted into batches, @@ -148,6 +149,8 @@ #' 1. `redcap_repeat_instrument` and `redcap_repeat_instance` will be returned #' for projects with repeating instruments #' +#' @section Export permissions: +#' #' For [redcap_read_oneshot()] to function properly, the user must have Export #' permissions for the 'Full Data Set'. Users with only 'De-Identified' #' export privileges can still use `redcap_read_oneshot`. To grant the @@ -156,6 +159,8 @@ #' * select the desired user, and then select 'Edit User Privileges', #' * in the 'Data Exports' radio buttons, select 'Full Data Set'. #' +#' @section Pseudofields: +#' #' The REDCap project may contain "pseudofields", depending on its structure. #' Pseudofields are exported for certain project structures, but are not #' defined by users and do not appear in the codebook. diff --git a/man/redcap_read.Rd b/man/redcap_read.Rd index 37b19ce8..f256cc42 100644 --- a/man/redcap_read.Rd +++ b/man/redcap_read.Rd @@ -179,7 +179,9 @@ retrieves subsets of the data, and then combines them before returning be more appropriate than \code{\link[=redcap_read_oneshot]{redcap_read_oneshot()}} when returning large datasets that could tie up the server. } -\details{ +\section{Batching subsets of data}{ + + \code{\link[=redcap_read]{redcap_read()}} internally uses multiple calls to \code{\link[=redcap_read_oneshot]{redcap_read_oneshot()}} to select and return data. Initially, only the primary key is queried through the REDCap API. The long list is then subsetted into batches, @@ -209,6 +211,10 @@ included, even if not explicitly requested. As a result: \item \code{redcap_repeat_instrument} and \code{redcap_repeat_instance} will be returned for projects with repeating instruments } +} + +\section{Export permissions}{ + For \code{\link[=redcap_read_oneshot]{redcap_read_oneshot()}} to function properly, the user must have Export permissions for the 'Full Data Set'. Users with only 'De-Identified' @@ -219,6 +225,10 @@ appropriate permissions: \item select the desired user, and then select 'Edit User Privileges', \item in the 'Data Exports' radio buttons, select 'Full Data Set'. } +} + +\section{Pseudofields}{ + The REDCap project may contain "pseudofields", depending on its structure. Pseudofields are exported for certain project structures, but are not @@ -247,6 +257,7 @@ throw an error like }\if{html}{\out{}} } } + \examples{ \dontrun{ uri <- "https://bbmc.ouhsc.edu/redcap/api/"