Skip to content

Commit

Permalink
Merge pull request #404 from OuhscBbmc/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
wibeasley authored Aug 10, 2022
2 parents e612caf + ded2813 commit efd8a74
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 91 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ utility/
^codecov\.yml$
^pkgdown$
^LICENSE\.md$
^CRAN-SUBMISSION$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
"[email protected]", comment = c(ORCID = "0000-0002-5613-5006")),
person("David", "Bard", role = "ctb"),
Expand Down
9 changes: 5 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Upcoming Versions
Version 1.1.0 (released 2022-08-10)
==========================================================

### New Features
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion R/REDCapR-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/constant.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/redcap-read-oneshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion REDCapR.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageCleanBeforeInstall: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace,vignette
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 32 additions & 14 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion man/REDCapR-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/constant.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/redcap_read_oneshot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 0 additions & 59 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -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 |<U+0394> |
|:-----------|:------|:-------|:--|
|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

2 changes: 1 addition & 1 deletion vignettes/BasicREDCapROperations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions vignettes/advanced-redcapr-operations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>%
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions vignettes/workflow-read.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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).

0 comments on commit efd8a74

Please sign in to comment.