diff --git a/.Rbuildignore b/.Rbuildignore index 7a7671ca..2aaebd85 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -25,3 +25,4 @@ utility/ ^codecov\.yml$ ^pkgdown$ ^LICENSE\.md$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index adf1468a..66b7086c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Description: Encapsulates functions to streamline calls from R to the REDCap University. The Application Programming Interface (API) offers an avenue to access and modify data programmatically, improving the capacity for literate and reproducible programming. -Version: 1.0.9002 +Version: 1.1.0 Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email = "wibeasley@hotmail.com", comment = c(ORCID = "0000-0002-5613-5006")), person("David", "Bard", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index c20ee69f..6765befe 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -Upcoming Versions +Version 1.1.0 (released 2022-08-10) ========================================================== ### New Features @@ -41,7 +41,7 @@ The package has been stable for years and should be reflected in the major versi * The functions `redcap_read_oneshot()`, `redcap_read()`, & `redcap_read_oneshot_eav()` now support the parameters `datetime_range_begin` and `datetime_range_end`. The are passed to the REDCap parameters `dateRangeBegin` and `dateRangeEnd`, which restricts records returned, based on their last modified date in the server. (Thanks @pbchase, #321 & #323.) * Better documentation about the `export_survey_fields` parameter in the functions `redcap_read()` & `redcap_read_oneshot()`. (Thanks @isaactpetersen, #333) * New function [`redcap_report()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_report.html) export records that populate a REDCap report. (#326.) -* New vignette [Typical REDCap Workflow for a Data Analyst](https://ouhscbbmc.github.io/REDCapR/articles/workflow-read.html) developed to support a workshop for the 2021 [R/Medicine Conference](https://r-medicine.org/) (#332, with @higgi13425, @kamclean, & Amanda Miller) +* New vignette [Typical REDCap Workflow for a Data Analyst](https://ouhscbbmc.github.io/REDCapR/articles/workflow-read.html) developed to support a workshop for the 2021 [R/Medicine Conference](https://events.linuxfoundation.org/r-medicine/) (#332, with @higgi13425, @kamclean, & Amanda Miller) * New function [`create_credential_local()`](https://ouhscbbmc.github.io/REDCapR/reference/retrieve_credential.html) starts a well-formed csv file that can contain tokens. (#340, after conversations with @higgi13425 & @kamclean.) ### Stability Features @@ -267,8 +267,9 @@ Version 0.1 (Released 2014-01-14) * `redcap_read()` takes parameter for `raw_or_label` (Thanks Rollie Parrish #3) * `redcap_read()` takes parameter for `export_data_access_groups` thanks to Rollie Parrish (@rparrish #4) +---------------------------------------- + GitHub Commits and Releases -========================================================== -* For a detailed change log, please see https://github.com/OuhscBbmc/REDCapR/commits/master. +* For a detailed change log, please see https://github.com/OuhscBbmc/REDCapR/commits/main. * For a list of the major releases, please see https://github.com/OuhscBbmc/REDCapR/releases. diff --git a/R/REDCapR-package.R b/R/REDCapR-package.R index fe1fc5d4..ab019bd8 100644 --- a/R/REDCapR-package.R +++ b/R/REDCapR-package.R @@ -28,7 +28,7 @@ #' collaboration with [OKDHS](https://oklahoma.gov/okdhs.html); #' David Bard, PI, OUHSC; 2014-2017. #' * *Integrative Analysis of Longitudinal Studies of Aging (IALSA)*, -#' sponsored by [NIH 5P01AG043362](https://grantome.com/grant/NIH/P01-AG043362). +#' sponsored by [NIH 5P01AG043362](https://grantome.com/grant/NIH/P01-AG043362-05). #' Scott Hofer, PI, University of Victoria; #' Will Beasley, PI of site-award, OUHSC; 2013-2018. #' * *Oklahoma Shared Clinical and Translational Resources*, sponsored by diff --git a/R/constant.R b/R/constant.R index 7f09801c..6e5e8a13 100644 --- a/R/constant.R +++ b/R/constant.R @@ -47,7 +47,7 @@ #' To add more, please for and edit #' [constant.R](https://github.com/OuhscBbmc/REDCapR/blob/master/R/constant.R) #' on GitHub and submit a pull request. For instructions, please see -#' [Editing files in another user's repository](https://help.github.com/articles/editing-files-in-another-user-s-repository/) # nolint +#' [Editing files in another user's repository](https://docs.github.com/articles/editing-files-in-another-user-s-repository/) # nolint #' in the GitHub documentation. #' #' @author Will Beasley diff --git a/R/redcap-read-oneshot.R b/R/redcap-read-oneshot.R index dbc6510e..c1093221 100644 --- a/R/redcap-read-oneshot.R +++ b/R/redcap-read-oneshot.R @@ -101,7 +101,7 @@ #' 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, +#' 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*. #' #' @author Will Beasley diff --git a/README.md b/README.md index e9a77454..711dd708 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ We'd like to thank the following developers for their [advice](https://github.co ### Funders -Much of this package has been developed to support the needs of the following projects. We appreciate the support. (So far) the primary developers of REDCapR are the external evaluators for [Oklahoma's MIECHV](https://oklahoma.gov/health/family-health/family-support-and-prevention-service.html) program. See the preliminary CQI reports (many of which use REDCapR) at https://ouhscbbmc.github.io/MReportingPublic/. +Much of this package has been developed to support the needs of the following projects. We appreciate the support. (So far) the primary developers of REDCapR are the external evaluators for [Oklahoma's MIECHV](https://oklahoma.gov/health/health-education/children---family-health/family-support-and-prevention-service/miechv-program-federal-home-visiting-grant.html) program. See the preliminary CQI reports (many of which use REDCapR) at https://ouhscbbmc.github.io/MReportingPublic/. * *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting ([MIECHV](https://mchb.hrsa.gov/maternal-child-health-initiatives/home-visiting-overview)) Project*. HRSA/ACF D89MC23154. David Bard, PI, OUHSC; 2011-2015. * *Independent Evaluation of the State of OK MIECHV Evidence Based Home Visitation Project*, [NIH](https://www.nih.gov/)-sponsored collaboration with [OSDH](https://oklahoma.gov/health.html). David Bard, PI, OUHSC; 2015-2017. diff --git a/REDCapR.Rproj b/REDCapR.Rproj index 980eee95..6b5170d6 100644 --- a/REDCapR.Rproj +++ b/REDCapR.Rproj @@ -17,6 +17,5 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes -PackageCleanBeforeInstall: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace,vignette diff --git a/_pkgdown.yml b/_pkgdown.yml index b0590fda..6a592c65 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -49,6 +49,7 @@ reference: Accessing other information from the REDCap project or server. contents: - redcap_arm_export + - redcap_dag_read - redcap_delete - redcap_download_instrument - redcap_event_instruments diff --git a/cran-comments.md b/cran-comments.md index a4ca8405..1888c4b7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -10,29 +10,47 @@ Thank you for taking the time to review my submission, and please tell me if the Test environments ----------------------------------------------- -1. Local Ubuntu, R 4.1.2 patched -1. Local Win8, R 4.1.2 patched -1. Local Win10, R 4.1.2 patched +1. Local Ubuntu, R 4.2.1 patched +1. Local Win10, R 4.2.1 patched 1. R-hub - 1. [Ubuntu Linux 20.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-d554cfab8fed4acba83ca159d2a14a7b) - 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-80a6d6b66bb84847b61d31f6029f5628) - 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-b5b0cb95fb4746f9b354071b89caaafa) -1. [win-builder](https://win-builder.r-project.org/BwNz2bnHxuse), development version. + 1. [Ubuntu Linux 20.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_1.1.0.tar.gz-65720cf9ae694996b81294e2ade39175) + 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_1.1.0.tar.gz-dfbf2b851e0c48aeaaf8e85c9c34c332) + 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_1.1.0.tar.gz-6fe170ebb60e41469336c822ca3465da) +1. [win-builder](https://win-builder.r-project.org/h66QMt5KzueV), development version. 1. [GiHub Actions](https://github.com/OuhscBbmc/REDCapR/actions), Ubuntu 20.04 LTS R CMD check results ----------------------------------------------- * No ERRORs or WARNINGs on any builds. - * One ignorable exception: the win-builder and Windows Server R-hub builds don't yet have the newest version of readr. I see they're using readr 1.4.0 and returns the error "Package required and available but unsuitable version: 'readr'". But it runs well on my two local Windows machines. - * A second ignorable exception: R-hub refers to Bioconductor, which REDCapR doesn't use: "Error : Bioconductor does not yet build and check packages for R version 4.2;" -* A NOTE is returned for the Zenodo.org URL being possibly invalid. It resolves in a browser, but is takes a while; I'm guessing their website's slow today. +* A NOTE is returned for a few websites. All are accessible by browser. + * https://grantome.com/grant/NIH/P01-AG043362 + * https://grantome.com/grant/NIH/U54-GM104938 + * https://taggs.hhs.gov/Detail/AwardDetail?arg_AwardNum=U54GM104938&arg_ProgOfficeCode=127 + * https://www.researchgate.net/profile/William-Beasley-5 + +* There is one NOTE that is only found on R-hub Windows (Server 2022, R-devel 64-bit): + + ```txt + * checking for detritus in the temp directory ... NOTE + Found the following files/directories: + 'lastMiKTeXException' + As noted in [R-hub issue #503](https://github.com/r-hub/rhub/issues/503), this could be due to a bug/crash in MiKTeX and can likely be ignored. + ``` + +* There is one NOTE that is only found on the R-hub Fedora: + + ```txt + * checking HTML version of manual ... NOTE + Skipping checking HTML validation: no command 'tidy' found + ``` + + Based on [this discussion](https://groups.google.com/g/r-sig-mac/c/7u_ivEj4zhM?pli=1), it sounds like a problem with the testing environment, and not the package code. Downstream dependencies ----------------------------------------------- -No downstream pakcages are affected. The two packages that depends/imports/suggests REDCapR passes checks with `revdepcheck::revdep_check()`. Results: https://github.com/OuhscBbmc/REDCapR/blob/master/revdep/cran.md - - * [codified](https://CRAN.R-project.org/package=codified) - * [ReviewR](https://CRAN.R-project.org/package=ReviewR) +No downstream packages are affected. The package that depends/imports/suggests REDCapR passes checks with `revdepcheck::revdep_check()`. Results: https://github.com/OuhscBbmc/REDCapR/blob/main/revdep/cran.md + +* [ReviewR](https://CRAN.R-project.org/package=ReviewR) diff --git a/man/REDCapR-package.Rd b/man/REDCapR-package.Rd index f89d6a7e..1173f260 100644 --- a/man/REDCapR-package.Rd +++ b/man/REDCapR-package.Rd @@ -29,7 +29,7 @@ David Bard, PI, OUHSC; 2015-2017. collaboration with \href{https://oklahoma.gov/okdhs.html}{OKDHS}; David Bard, PI, OUHSC; 2014-2017. \item \emph{Integrative Analysis of Longitudinal Studies of Aging (IALSA)}, -sponsored by \href{https://grantome.com/grant/NIH/P01-AG043362}{NIH 5P01AG043362}. +sponsored by \href{https://grantome.com/grant/NIH/P01-AG043362-05}{NIH 5P01AG043362}. Scott Hofer, PI, University of Victoria; Will Beasley, PI of site-award, OUHSC; 2013-2018. \item \emph{Oklahoma Shared Clinical and Translational Resources}, sponsored by diff --git a/man/constant.Rd b/man/constant.Rd index ff82cfbb..dcb668ad 100644 --- a/man/constant.Rd +++ b/man/constant.Rd @@ -62,7 +62,7 @@ See https://your-server/redcap/api/help/?content=exp_users. To add more, please for and edit \href{https://github.com/OuhscBbmc/REDCapR/blob/master/R/constant.R}{constant.R} on GitHub and submit a pull request. For instructions, please see -\href{https://help.github.com/articles/editing-files-in-another-user-s-repository/}{Editing files in another user's repository} # nolint +\href{https://docs.github.com/articles/editing-files-in-another-user-s-repository/}{Editing files in another user's repository} # nolint in the GitHub documentation. } \examples{ diff --git a/man/redcap_read_oneshot.Rd b/man/redcap_read_oneshot.Rd index 5c4d96aa..b620a67c 100644 --- a/man/redcap_read_oneshot.Rd +++ b/man/redcap_read_oneshot.Rd @@ -161,7 +161,7 @@ documentation is available at https://cran.r-project.org/package=httr. 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: \emph{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, +API request is \strong{not} in a data access group. If the user is in a group, then this flag will revert to its default value}. } \examples{ diff --git a/revdep/README.md b/revdep/README.md index 2c4c396f..cb44437e 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,61 +1,2 @@ # Platform -|field |value | -|:--------|:-------------------------------------------| -|version |R version 4.1.0 Patched (2021-05-29 r80415) | -|os |Windows >= 8 x64 | -|system |x86_64, mingw32 | -|ui |RStudio | -|language |(EN) | -|collate |English_United States.1252 | -|ctype |English_United States.1252 | -|tz |America/Chicago | -|date |2021-07-21 | - -# Dependencies - -|package |old |new | | -|:-----------|:------|:-------|:--| -|REDCapR |0.11.0 |1.0.0.0 |* | -|askpass |1.1 |1.1 | | -|backports |1.2.1 |1.2.1 | | -|bit |4.0.4 |4.0.4 | | -|bit64 |4.0.5 |4.0.5 | | -|checkmate |2.0.0 |2.0.0 | | -|cli |3.0.1 |3.0.1 | | -|clipr |0.7.1 |0.7.1 | | -|cpp11 |0.3.1 |0.3.1 | | -|crayon |1.4.1 |1.4.1 | | -|curl |4.3.2 |4.3.2 | | -|dplyr |1.0.7 |1.0.7 | | -|ellipsis |0.3.2 |0.3.2 | | -|fansi |0.5.0 |0.5.0 | | -|generics |0.1.0 |0.1.0 | | -|glue |1.4.2 |1.4.2 | | -|hms |1.1.0 |1.1.0 | | -|httr |1.4.2 |1.4.2 | | -|jsonlite |1.7.2 |1.7.2 | | -|lifecycle |1.0.0 |1.0.0 | | -|magrittr |2.0.1 |2.0.1 | | -|mime |0.11 |0.11 | | -|openssl |1.4.4 |1.4.4 | | -|pillar |1.6.1 |1.6.1 | | -|pkgconfig |2.0.3 |2.0.3 | | -|prettyunits |1.1.1 |1.1.1 | | -|progress |1.2.2 |1.2.2 | | -|purrr |0.3.4 |0.3.4 | | -|R6 |2.5.0 |2.5.0 | | -|readr |2.0.0 |2.0.0 | | -|rlang |0.4.11 |0.4.11 | | -|sys |3.4 |3.4 | | -|tibble |3.1.2 |3.1.2 | | -|tidyr |1.1.3 |1.1.3 | | -|tidyselect |1.1.1 |1.1.1 | | -|tzdb |0.1.2 |0.1.2 | | -|utf8 |1.2.1 |1.2.1 | | -|vctrs |0.3.8 |0.3.8 | | -|vroom |1.5.3 |1.5.3 | | -|withr |2.4.2 |2.4.2 | | - -# Revdeps - diff --git a/vignettes/BasicREDCapROperations.Rmd b/vignettes/BasicREDCapROperations.Rmd index aad1fc70..4d07fafd 100644 --- a/vignettes/BasicREDCapROperations.Rmd +++ b/vignettes/BasicREDCapROperations.Rmd @@ -27,7 +27,7 @@ opts_chunk$set( tidy = FALSE ) -knit_print.data.frame = function(x, ...) { +knit_print.data.frame <- function(x, ...) { # See https://cran.r-project.org/package=knitr/vignettes/knit_print.html # res = paste(c("", "", kable(x)), collapse = "\n") # asis_output(res) diff --git a/vignettes/advanced-redcapr-operations.Rmd b/vignettes/advanced-redcapr-operations.Rmd index fe74d699..c85befff 100644 --- a/vignettes/advanced-redcapr-operations.Rmd +++ b/vignettes/advanced-redcapr-operations.Rmd @@ -26,7 +26,7 @@ opts_chunk$set( ) # knitr::opts_chunk$set(comment = "#>", collapse = TRUE) -knit_print.data.frame = function(x, ...) { +knit_print.data.frame <- function(x, ...) { # See https://cran.r-project.org/package=knitr/vignettes/knit_print.html x %>% @@ -70,7 +70,7 @@ Converting from tall/long to wide However we like going wide to produce visual tables for publications, and here's one way to do it in R. First retrieve the dataset from REDCap. ```{r retrieve-longitudinal, results='hold'} -library(magrittr); +library(magrittr) suppressPackageStartupMessages(requireNamespace("dplyr")) suppressPackageStartupMessages(requireNamespace("tidyr")) events_to_retain <- c("dose_1_arm_1", "visit_1_arm_1", "dose_2_arm_1", "visit_2_arm_1") diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 628d0a4b..e681e721 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -290,7 +290,7 @@ https://github.com/OuhscBbmc/RedcapExamplesAndPatterns/blob/master/Publications/ Downstream Reproducible Reports ------------------------- -Once the dataset is in R, take advantage of all the reproducible research tools available. Tomorrow, [R/Medicine](https://r-medicine.org/) has a workshop on this topic using the exciting new [Quarto](https://quarto.org/) program that's similar to R Markdown. Also see the relevant [R/Medicine 2020 presentation videos](https://www.youtube.com/playlist?list=PL4IzsxWztPdljYo7uE5G_R2PtYw3fUReo). And of course, [any book by Yihui Xie and colleagues](https://www.amazon.com/Yihui-Xie/e/B00E9CQJGY?ref=sr_ntt_srch_lnk_1&qid=1625895927&sr=1-1). +Once the dataset is in R, take advantage of all the reproducible research tools available. Tomorrow, [R/Medicine](https://events.linuxfoundation.org/r-medicine/) has a workshop on this topic using the exciting new [Quarto](https://quarto.org/) program that's similar to R Markdown. Also see the relevant [R/Medicine 2020 presentation videos](https://www.youtube.com/playlist?list=PL4IzsxWztPdljYo7uE5G_R2PtYw3fUReo). And of course, [any book by Yihui Xie and colleagues](https://www.amazon.com/Yihui-Xie/e/B00E9CQJGY?ref=sr_ntt_srch_lnk_1&qid=1625895927&sr=1-1). Batching @@ -308,4 +308,4 @@ Notes This vignette was originally designed for a 2021 R/Medicine REDCap workshop with [Peter Higgins](https://www.med.umich.edu/higginslab/), [Amanda Miller](https://coloradosph.cuanschutz.edu/resources/directory/directory-profile/Miller-Amanda-UCD6000053152), and [Kenneth McLean](https://twitter.com/kennethmclean92). -This work was made possible in part by the NIH grant [U54GM104938](https://hsrproject.nlm.nih.gov/view_hsrproj_record/20204379) to the [Oklahoma Shared Clinical and Translational Resource)](http://osctr.ouhsc.edu). +This work was made possible in part by the NIH grant [U54GM104938](https://taggs.hhs.gov/Detail/AwardDetail?arg_AwardNum=U54GM104938&arg_ProgOfficeCode=127) to the [Oklahoma Shared Clinical and Translational Resource)](http://osctr.ouhsc.edu).