diff --git a/R/redcap-read-oneshot.R b/R/redcap-read-oneshot.R index b2cb38bc..5a7094a8 100644 --- a/R/redcap-read-oneshot.R +++ b/R/redcap-read-oneshot.R @@ -93,9 +93,9 @@ #' viewable by executing [httr::httr_options()]. The `httr` package and #' documentation is available at https://cran.r-project.org/package=httr. #' -#' If you do not pass in this export_data_access_groups value, it will default -#' to `FALSE`. The following is from the API help page for version 5.2.3: -#' This flag is only viable if the user whose token is being used to make the +#' If you do not pass in this `export_data_access_groups` value, it will default +#' to `FALSE`. The following is from the API help page for version 10.5.1: +#' >This flag is only viable if the user whose token is being used to make the #' API request is *not* in a data access group. If the user is in a group, #' then this flag will revert to its default value. #' diff --git a/R/redcap-read.R b/R/redcap-read.R index b7a356f3..11295cfe 100644 --- a/R/redcap-read.R +++ b/R/redcap-read.R @@ -102,7 +102,7 @@ #' * `elapsed_seconds`: The duration of the function. #' #' @details -#' Specifically, it internally uses multiple calls to [redcap_read_oneshot()] +#' [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, #' whose sizes are determined by the `batch_size` parameter. REDCap is then @@ -117,7 +117,7 @@ #' A second benefit is less RAM is required on the webserver. Because #' each batch is smaller than the entire dataset, the webserver #' tackles more manageably sized objects in memory. Consider batching -#' if you encounter the error +#' if you encounter the error: #' #' ``` #' ERROR: REDCap ran out of server memory. The request cannot be processed. diff --git a/man/redcap_read.Rd b/man/redcap_read.Rd index 4c304ec9..0cbe28de 100644 --- a/man/redcap_read.Rd +++ b/man/redcap_read.Rd @@ -166,7 +166,7 @@ be more appropriate than \code{\link[=redcap_read_oneshot]{redcap_read_oneshot() datasets that could tie up the server. } \details{ -Specifically, it internally uses multiple calls to \code{\link[=redcap_read_oneshot]{redcap_read_oneshot()}} +\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, whose sizes are determined by the \code{batch_size} parameter. REDCap is then @@ -181,7 +181,7 @@ the webserver when exporting/importing a large dataset. A second benefit is less RAM is required on the webserver. Because each batch is smaller than the entire dataset, the webserver tackles more manageably sized objects in memory. Consider batching -if you encounter the error\preformatted{ERROR: REDCap ran out of server memory. The request cannot be processed. +if you encounter the error:\preformatted{ERROR: REDCap ran out of server memory. The request cannot be processed. Please try importing/exporting a smaller amount of data. } diff --git a/man/redcap_read_oneshot.Rd b/man/redcap_read_oneshot.Rd index 2a96963a..fe9d9b4a 100644 --- a/man/redcap_read_oneshot.Rd +++ b/man/redcap_read_oneshot.Rd @@ -149,11 +149,8 @@ The full list of configuration options accepted by the \code{httr} package is viewable by executing \code{\link[httr:httr_options]{httr::httr_options()}}. The \code{httr} package and documentation is available at https://cran.r-project.org/package=httr. -If you do not pass in this export_data_access_groups value, it will default -to \code{FALSE}. The following is from the API help page for version 5.2.3: -This flag is only viable if the user whose token is being used to make the -API request is \emph{not} in a data access group. If the user is in a group, -then this flag will revert to its default value. +If you do not pass in this \code{export_data_access_groups} value, it will default +to \code{FALSE}. The following is from the API help page for version 10.5.1:This flag is only viable if the user whose token is being used to make theAPI request is not in a data access group. If the user is in a group,then this flag will revert to its default value. } \examples{ \dontrun{ diff --git a/utility/refresh.R b/utility/refresh.R index 0709340c..162605ae 100644 --- a/utility/refresh.R +++ b/utility/refresh.R @@ -9,6 +9,7 @@ devtools::build_vignettes() checks_to_exclude <- c( "covr", + "cyclocomp", "lintr_line_length_linter" ) gp <- diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index a4ec9566..4321aff9 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -1,6 +1,6 @@ --- title: "Typical REDCap Workflow for a Data Analyst" -author: Will Beasley & Geneva Marshall, [Biomedical & Behavior Methodology Core](https://ouhsc.edu/bbmc/team/), OUHSC Pediatrics +author: Will Beasley, Geneva Marshall, & Thomas Wilson, [Biomedical & Behavior Methodology Core](https://ouhsc.edu/bbmc/team/), OUHSC Pediatrics output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Typical REDCap Workflow for a Data Analyst} @@ -41,7 +41,7 @@ Check with your institution's REDCap administrator to ensure you have This might be the first time you've ever needed to request a token, and your institution may have a formal process for API approval. Your REDCap admin can help. -For this vignette, we'll use a fake dataset hosted at "https://ou.edu/redcap/api/" and accessible with the token "9A81268476645C4E5F03428B8AC3AA7B". +For this vignette, we'll use a fake dataset hosted at "https://bbmc.ouhsc.edu/redcap/api/" and accessible with the token "9A81268476645C4E5F03428B8AC3AA7B". Note to REDCap Admins: @@ -80,9 +80,9 @@ The [`retrieve_credential_local()`](https://ouhscbbmc.github.io/REDCapR/referenc ```csv redcap_uri,username,project_id,token,comment -"https://ou.edu/redcap/api/","myusername",153,9A81268476645C4E5F03428B8AC3AA7B,"simple" -"https://ou.edu/redcap/api/","myusername",212,0434F0E9CF53ED0587847AB6E51DE762,"longitudinal" -"https://ou.edu/redcap/api/","myusername",213,D70F9ACD1EDD6F151C6EA78683944E98,"write data" +"https://bbmc.ouhsc.edu/redcap/api/","myusername",153,9A81268476645C4E5F03428B8AC3AA7B,"simple" +"https://bbmc.ouhsc.edu/redcap/api/","myusername",212,0434F0E9CF53ED0587847AB6E51DE762,"longitudinal" +"https://bbmc.ouhsc.edu/redcap/api/","myusername",213,D70F9ACD1EDD6F151C6EA78683944E98,"write data" ``` To retrieve the credentials for the first project listed above, pass the value of "153" to `project_id`. @@ -260,7 +260,7 @@ Part 6 - Next Steps Other REDCapR Resources ------------------------- -In addition to documentation [for each function](https://ouhscbbmc.github.io/REDCapR/reference) the REDCapR package contains a handful of [vignettes](https://ouhscbbmc.github.io/REDCapR/articles) including a troubleshooting guide. +In addition to documentation [for each function](https://ouhscbbmc.github.io/REDCapR/reference) the REDCapR package contains a handful of [vignettes](https://ouhscbbmc.github.io/REDCapR/articles) including a [troubleshooting guide](https://ouhscbbmc.github.io/REDCapR/articles/TroubleshootingApiCalls.html). Create an Arch for Reuse ------------------------- @@ -277,7 +277,7 @@ Once the dataset is in R, take advantage of all the reproducible research tools Batching ------------------------- -By default, `REDCapR::redcap_read()` requests datasets of 100 patients as a time, and stacks the resulting subsets together before returning a data.frame. This can be adjusted to improve performance; see the 'Details' section of [`REDCapR::redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html). +By default, `REDCapR::redcap_read()` requests datasets of 100 patients as a time, and stacks the resulting subsets together before returning a data.frame. This can be adjusted to improve performance; the 'Details' section of [`REDCapR::redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html#details) discusses the trade offs. Writing to the Server -------------------------