From 4ca0fca9391fe327b0bf8960156c262d4a441ab9 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 13:01:20 -0500 Subject: [PATCH 01/14] remove LazyData value to remove warning > 'LazyData' is specified without a 'data' directory https://stackoverflow.com/questions/66860659/lazydata-is-specified-without-a-data-directory-error-when-submitting-r-packa --- DESCRIPTION | 1 - 1 file changed, 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6ccf6b83..47091561 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,7 +44,6 @@ Suggests: sessioninfo (>= 1.1.1), testthat (>= 3.0) License: GPL-2 -LazyData: TRUE VignetteBuilder: knitr Encoding: UTF-8 RoxygenNote: 7.1.1 From b0cd73906f880b6b2cb1a522bc576d1c72a667fd Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 13:24:21 -0500 Subject: [PATCH 02/14] switch to MIT --- .Rbuildignore | 1 + DESCRIPTION | 2 +- LICENSE | 2 ++ LICENSE.md | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 LICENSE.md diff --git a/.Rbuildignore b/.Rbuildignore index 3209fa29..7a7671ca 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -24,3 +24,4 @@ utility/ ^CRAN-RELEASE$ ^codecov\.yml$ ^pkgdown$ +^LICENSE\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index 47091561..ba1751ac 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -43,7 +43,7 @@ Suggests: rmarkdown (>= 2.0), sessioninfo (>= 1.1.1), testthat (>= 3.0) -License: GPL-2 +License: MIT + file LICENSE VignetteBuilder: knitr Encoding: UTF-8 RoxygenNote: 7.1.1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..d87ed59c --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2021 +COPYRIGHT HOLDER: REDCapR authors diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..88801626 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2021 REDCapR authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From b1ff1e9d21e9e5568e55ff25d7d41be6cb07f7a5 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 13:24:55 -0500 Subject: [PATCH 03/14] run revdepcheck https://r-lib.github.io/revdepcheck/reference/revdep_check.html --- revdep/.gitignore | 7 ++++++ revdep/README.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++ revdep/cran.md | 7 ++++++ revdep/email.yml | 5 ++++ revdep/failures.md | 1 + revdep/problems.md | 1 + 6 files changed, 82 insertions(+) create mode 100644 revdep/.gitignore create mode 100644 revdep/README.md create mode 100644 revdep/cran.md create mode 100644 revdep/email.yml create mode 100644 revdep/failures.md create mode 100644 revdep/problems.md diff --git a/revdep/.gitignore b/revdep/.gitignore new file mode 100644 index 00000000..111ab324 --- /dev/null +++ b/revdep/.gitignore @@ -0,0 +1,7 @@ +checks +library +checks.noindex +library.noindex +cloud.noindex +data.sqlite +*.html diff --git a/revdep/README.md b/revdep/README.md new file mode 100644 index 00000000..2c4c396f --- /dev/null +++ b/revdep/README.md @@ -0,0 +1,61 @@ +# 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/revdep/cran.md b/revdep/cran.md new file mode 100644 index 00000000..d07935b8 --- /dev/null +++ b/revdep/cran.md @@ -0,0 +1,7 @@ +## revdepcheck results + +We checked 2 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. + + * We saw 0 new problems + * We failed to check 0 packages + diff --git a/revdep/email.yml b/revdep/email.yml new file mode 100644 index 00000000..0c5cef87 --- /dev/null +++ b/revdep/email.yml @@ -0,0 +1,5 @@ +release_date: ??? +rel_release_date: ??? +my_news_url: ??? +release_version: ??? +release_details: ??? diff --git a/revdep/failures.md b/revdep/failures.md new file mode 100644 index 00000000..9a207363 --- /dev/null +++ b/revdep/failures.md @@ -0,0 +1 @@ +*Wow, no problems at all. :)* \ No newline at end of file diff --git a/revdep/problems.md b/revdep/problems.md new file mode 100644 index 00000000..9a207363 --- /dev/null +++ b/revdep/problems.md @@ -0,0 +1 @@ +*Wow, no problems at all. :)* \ No newline at end of file From cfe623a5a6562d24cef18ceaeabe662f705343cf Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 13:55:02 -0500 Subject: [PATCH 04/14] prepare for CRAN submission v1.0 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++-- README.md | 5 +++-- cran-comments.md | 23 +++++++++++------------ vignettes/TroubleshootingApiCalls.Rmd | 4 ++-- vignettes/workflow-read.Rmd | 2 ++ 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ba1751ac..fef856eb 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: 0.11.1.9005 +Version: 1.0.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 8215ac34..3a8e342b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,9 +4,11 @@ Upcoming Versions In the future: ... -Version 0.12 (Unreleased on CRAN) +Version 1.0 (released 2021-07-21) ========================================================== +The package has been stable for years and should be reflected in the major version number. + ### Minor Enhancements * When writing records to the server, the functions `redcap_write()` and `redcap_write_oneshot()` have a new parameter that converts R's `logical`/boolean columns to integers. This meshes well with T/F and Y/N items that are coded as 1/0 underneath. The default will be FALSE (ie, the integers are not converted by default), so it doesn't break existing code. (#305) @@ -20,7 +22,8 @@ Version 0.12 (Unreleased on CRAN) ### Stability Features * update for newer version of testthat -v3.0.0 (#312) -* update for newer version of readr (#313) +* update for newer version of readr 2.0.0 (#343) +* update for newer version of readr 1.4.0 (#313) * update for newer version of REDCap on test server (#310) * save expected datasets as files -instead of included in the actual test code (#308) diff --git a/README.md b/README.md index 86335d0c..7ba00d5c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ Much of this package has been developed to support the needs of the following pr * *Title IV-E Waiver Project*, [HRSA/MCHB](http://mchb.hrsa.gov/)-sponsored collaboration with [OKDHS](http://www.okdhs.org/); David Bard, PI, OUHSC; 2014-2017. * *Integrative Analysis of Longitudinal Studies of Aging (IALSA)*, sponsored by [NIH 5P01AG043362](http://grantome.com/grant/NIH/P01-AG043362). Scott Hofer, PI, University of Victoria; Will Beasley, PI of site-award, OUHSC; 2013-2018. * *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH NIGMS; U54 GM104938](http://grantome.com/grant/NIH/U54-GM104938). Judith A. James, PI, OUHSC; 2013-2018. -* Additional Institutional Support from OUHSC [Dept of Pediatrics](https://www.oumedicine.com/department-of-pediatrics); 2013-2017. +* *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH U54GM104938](https://hsrproject.nlm.nih.gov/view_hsrproj_record/20204379); 2020-2021. +* Additional Institutional Support from OUHSC [Dept of Pediatrics](https://www.oumedicine.com/department-of-pediatrics); 2013-2021. Thanks, [Will Beasley](https://www.researchgate.net/profile/William_Beasley2), David Bard, & Thomas Wilson
@@ -86,7 +87,7 @@ Thanks, | :--- | :----- | | [License](https://choosealicense.com/) | [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) | | [CRAN Version](https://cran.r-project.org/package=REDCapR) | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/REDCapR)](https://cran.r-project.org/package=REDCapR) | -| [CRAN Rate](http://cranlogs.r-pkg.org/) | ![CRAN Pace](http://cranlogs.r-pkg.org/badges/REDCapR) | +| [CRAN Rate](https://cranlogs.r-pkg.org/) | ![CRAN Pace](https://cranlogs.r-pkg.org/badges/REDCapR) | | [Zenodo Archive](https://zenodo.org/search?ln=en&p=redcapr) | [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.61990.svg)](https://doi.org/10.5281/zenodo.61990) | | [Production Doc](https://www.rdocumentation.org/) | [![Rdoc](http://www.rdocumentation.org/badges/version/REDCapR)](http://www.rdocumentation.org/packages/REDCapR) | | [Development Doc](https://www.rdocumentation.org/) | [![Rdoc](https://img.shields.io/badge/pkgdown-GitHub.io-orange.svg?longCache=true&style=style=for-the-badge)](https://ouhscbbmc.github.io/REDCapR/) | diff --git a/cran-comments.md b/cran-comments.md index eb6bed1e..efb67a6e 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,36 +1,35 @@ Description ------------------------------------------------ -This submission includes new features and also addresses a recent breaking change from tibble 3.0.0 (https://github.com/OuhscBbmc/REDCapR/issues/302). +=============================================== -After the first submission, I've changed the links to the HRSA and Health Dept sites. I guess there is some problem with redirection. Although the health dept sites work in my browser, they're still returning useful sites in a browser. I've tried a few variations fo rht eurl that work in a browser, but still get flagged by win-builder. +This submission includes new features and also addresses recent breaking tests from readr 2.0 (). -Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley +The [single existing CRAN daily note](https://cran.rstudio.com/web/checks/check_results_REDCapR.html) has been addressed (ie, 'LazyData' is specified without a 'data' directory). +Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley Test environments ----------------------------------------------- -1. Local Ubuntu, R 3.6.3 patched -1. Local Win8, R 4.0.0 RC +1. Local Ubuntu, R 4.1.0 patched +1. Local Win8, R 4.1.0 patched 1. r-hub 1. [Ubuntu Linux 16.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-71151f2f04454bc18c16430e5d62610b) 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-2f619028b765442f9dc1c34373443d2a) 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-80133501925a411da4c3cf3be8205e29) 1. [win-builder](https://win-builder.r-project.org/xYyWrC1uFjXH), development version. -1. [Travis CI](https://travis-ci.com/OuhscBbmc/REDCapR), Ubuntu 14.04 LTS -1. [AppVeyor](https://ci.appveyor.com/project/wibeasley/REDCapR), Windows Server 2012 R2 - +1. [GiHub Actions](https://github.com/OuhscBbmc/REDCapR/actions), Ubuntu 20.04 LTS R CMD check results ----------------------------------------------- -* No ERRORs or WARNINGson any builds. +* No ERRORs or WARNINGs on any builds. * Two notes are returned for Health Dept sites, but they work in a browser. - Downstream dependencies ----------------------------------------------- -No downstream pakcages are affecteed. Only one package depends/imports REDCapR, and it passes my local checks. +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) diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index fdca6b17..230d6293 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -99,7 +99,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") 1. **Can a user query the API successfully with Postman with the their own token?** The values you enter should be exactly the same as those entered in the previous step. A failure here (assuming the previous step was successful) suggests a network or firewall issue. If the server is behind your institution's firewall, verify the you are connecting successfully through the VPN. -1. **Can a user query the API with cURL?** [cURL](http://curl.haxx.se/docs/manpage.html) is a command line tool that's underneath a lot of libraries. If it's installed correctly on your location machine, it can be executed from the terminal or command line. +1. **Can a user query the API with cURL?** [cURL](https://curl.se/) is a command line tool that's underneath a lot of libraries. If it's installed correctly on your location machine, it can be executed from the terminal or command line. ```shell curl -X POST -H "Cache-Control: no-cache" -F "token=9A81268476645C4E5F03428B8AC3AA7B" -F "content=record" -F "format=csv" "https://bbmc.ouhsc.edu/redcap/api/" @@ -166,7 +166,7 @@ R Reading without a Package ------------------------------------------------------------------ -There are several ways to call REDCap's API from [R](https://cran.r-project.org/). The packages [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://github.com/OuhscBbmc/REDCapR) both rely on the [httr](https://cran.r-project.org/package=httr) package, which calls the [curl](https://cran.r-project.org/package=curl) package, which calls [cURL](http://curl.haxx.se/docs/manpage.html). +There are several ways to call REDCap's API from [R](https://cran.r-project.org/). The packages [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://github.com/OuhscBbmc/REDCapR) both rely on the [httr](https://cran.r-project.org/package=httr) package, which calls the [curl](https://cran.r-project.org/package=curl) package, which calls [cURL](https://curl.se/). 1. **Is httr installed on the user's local machine?** If so, running `library(httr)` should not produce any error messages if you're starting with a fresh session of R: diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 4321aff9..6504c0b9 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -288,3 +288,5 @@ Notes =================================== This vignette was originally designed for a 2021 R/Medicine REDCap workshop with [Peter Higgins](http://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). From 655b01138586edd8e24bb539cafb4a92d87267a8 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 14:24:57 -0500 Subject: [PATCH 05/14] updating links caught by RHub Will need a second round of checks after ref #345 --- CONDUCT.md | 2 +- DESCRIPTION | 2 +- NEWS.md | 6 ++-- R/REDCapR-package.R | 20 ++++++------- R/redcap-download-file-oneshot.R | 2 +- R/redcap-download-instrument.R | 2 +- R/redcap-metadata-read.R | 2 +- R/redcap-metadata-write.R | 4 +-- R/redcap-project.R | 4 +-- R/redcap-read-oneshot-eav.R | 2 +- R/redcap-read-oneshot.R | 2 +- R/redcap-read.R | 2 +- R/redcap-report.R | 2 +- R/redcap-survey-link-export-oneshot.R | 2 +- R/redcap-upload-file-oneshot.R | 2 +- R/redcap-variables.R | 2 +- R/redcap-write-oneshot.R | 4 +-- R/redcap-write.R | 2 +- R/retrieve-credential.R | 2 +- README.md | 30 +++++++++---------- _pkgdown.yml | 2 +- .../first-time-setup.md | 10 +++---- .../online-material.md | 8 ++--- .../retired-documentation.md | 2 +- inst/misc/bad.credentials | 2 +- .../project-longitudinal/expected/default.R | 2 +- .../expected/filter-character.R | 2 +- .../expected/filter-numeric.R | 2 +- .../longitudinal-data.csv | 2 +- .../repeating-instruments-full.xml | 4 +-- man/REDCapR-package.Rd | 14 ++++----- man/figures/logo.svg | 22 +++++++------- man/redcap_download_file_oneshot.Rd | 2 +- man/redcap_download_instrument.Rd | 2 +- man/redcap_metadata_read.Rd | 2 +- man/redcap_metadata_write.Rd | 2 +- man/redcap_read.Rd | 2 +- man/redcap_read_oneshot.Rd | 2 +- man/redcap_read_oneshot_eav.Rd | 2 +- man/redcap_report.Rd | 2 +- man/redcap_survey_link_export_oneshot.Rd | 2 +- man/redcap_upload_file_oneshot.Rd | 2 +- man/redcap_variables.Rd | 2 +- man/redcap_write.Rd | 2 +- man/redcap_write_oneshot.Rd | 2 +- man/retrieve_credential.Rd | 2 +- playgrounds/HttrPlayground.R | 6 ++-- playgrounds/MetadataPlayground.R | 2 +- playgrounds/PlaygroundColumnSanitize.R | 2 +- playgrounds/SSL3Playground.R | 2 +- playgrounds/retired/retrieve-token.R | 2 +- playgrounds/ssl_playground.R | 4 +-- tests/testthat/test-read-errors.R | 8 ++--- tests/testthat/test-read-russian.R | 2 +- utility/refresh.R | 4 +-- vignettes/BasicREDCapROperations.Rmd | 4 +-- vignettes/SecurityDatabase.Rmd | 20 ++++++------- vignettes/TroubleshootingApiCalls.Rmd | 22 +++++++------- vignettes/advanced-redcapr-operations.Rmd | 6 ++-- vignettes/workflow-read.Rmd | 10 ++++--- 60 files changed, 146 insertions(+), 144 deletions(-) diff --git a/CONDUCT.md b/CONDUCT.md index 52a673e8..9533ce6c 100644 --- a/CONDUCT.md +++ b/CONDUCT.md @@ -22,4 +22,4 @@ opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (http:contributor-covenant.org), version 1.0.0, available at -http://contributor-covenant.org/version/1/0/0/ +https://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION index fef856eb..cc067ae5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,7 +20,7 @@ Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email = comment = c(ORCID = '0000-0002-3386-6076')), person("Felix", "Torres", role = "ctb", email = "fetorres@ucsd.edu"), person("Philip", "Chase", role = "ctb", email = "pbc@ufl.edu")) -URL: https://ouhscbbmc.github.io/REDCapR, https://github.com/OuhscBbmc/REDCapR, http://ouhsc.edu/bbmc/, http://project-redcap.org +URL: https://ouhscbbmc.github.io/REDCapR, https://github.com/OuhscBbmc/REDCapR, https://ouhsc.edu/bbmc/, https://project-redcap.org BugReports: https://github.com/OuhscBbmc/REDCapR/issues Depends: R(>= 3.5.0) diff --git a/NEWS.md b/NEWS.md index 3a8e342b..749b861f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -130,7 +130,7 @@ Versions 0.9.7 (Released 2017-09-09) * Remove line breaks from token (Thanks @haozhu233 in issues #103 & #104) ### Minor Updates -* When combining batches into a single data.frame, `data.table::rbindlist()` is used. This should prevent errors with the first batch's data type (for a column) isn't compatible with a later batch. For instance, this occurs when the first batch has only integers for `record_id`, but a subsequent batch has values like `aa-test-aa`. The variable for the combined dataset should be a character. (Issue #128 & http://stackoverflow.com/questions/39377370/bind-rows-of-different-data-types; Thanks @arunsrinivasan) +* When combining batches into a single data.frame, `data.table::rbindlist()` is used. This should prevent errors with the first batch's data type (for a column) isn't compatible with a later batch. For instance, this occurs when the first batch has only integers for `record_id`, but a subsequent batch has values like `aa-test-aa`. The variable for the combined dataset should be a character. (Issue #128 & https://stackoverflow.com/questions/39377370/bind-rows-of-different-data-types; Thanks @arunsrinivasan) * Uses the `dplyr` package instead of `plyr`. This shouldn't affect callers, because immediately before returning the data, `REDCapR::redcap_read()` coerces the `tibble::tibble` (which was formerly called `dplyr::tbl_df`) back to a vanilla `data.frame` with `as.data.frame()`. * A few more instances of validating input parameters to read functions. (Issue #8). @@ -196,7 +196,7 @@ Version 0.4-28 (Released 2014-09-20) ### Updates * By default, the SSL certs come from the httr package. However, REDCapR will continue to maintain a copy in case httr's version on CRAN gets out of date. -* The tests are split into two collections: one that's run by the CRAN checks, and the other run manually. [Thanks, Gabor Csardi](http://stackoverflow.com/questions/25595487/testthat-pattern-for-long-running-tests). Any test with a dependency outside the package code (especially the REDCap test projects) is run manually so changes to the test databases won't affect the success of building the previous version on CRAN. +* The tests are split into two collections: one that's run by the CRAN checks, and the other run manually. [Thanks, Gabor Csardi](https://stackoverflow.com/questions/25595487/testthat-pattern-for-long-running-tests). Any test with a dependency outside the package code (especially the REDCap test projects) is run manually so changes to the test databases won't affect the success of building the previous version on CRAN. * Corrected typo in `redcap_download_file_oneshot()` documentation, thanks to Andrew Peters (@ARPeters #45). @@ -223,7 +223,7 @@ Version 0.2 (Released 2014-07-02) * The `redcap_project()` object reduces repeatedly passing parameters like the server URL, the user token, and the SSL cert location. ### Updates -* New Mozilla SSL Certification Bundles released on cURL (released 2013-12-05; http://curl.haxx.se/ca/cacert.pem) +* New Mozilla SSL Certification Bundles released on cURL (released 2013-12-05) * Renamed `redcap_read_batch()` to `redcap_read()`. These changes reflect our suggestion that reads should typically be batched. * Renamed `redcap_read()` to `redcap_read_oneshot()` * Renamed `redcap_write()` to `redcap_write_oneshot()` (which is an internal function). diff --git a/R/REDCapR-package.R b/R/REDCapR-package.R index 488354b3..02f91fd5 100644 --- a/R/REDCapR-package.R +++ b/R/REDCapR-package.R @@ -3,7 +3,7 @@ #' @aliases REDCapR #' #' @title R utilities for interacting with a REDCap data system -#' +#' #' #' @description #' @@ -14,28 +14,28 @@ #' following projects. We appreciate the support. #' * *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive #' Maternal, Infant, and Early Childhood Home Visiting -#' ([MIECHV](http://mchb.hrsa.gov/programs/homevisiting/)) Project*. -#' [HRSA/ACF D89MC23154](https://grants6.hrsa.gov/MCHB/DGISReports/Abstract/AbstractDetails.aspx?cbAbstractSummary=D89MC23154_2012_NonResearch_4). +#' ([MIECHV](https://mchb.hrsa.gov/programs/homevisiting/)) 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://ok.gov/health/). +#' with [OSDH](https://oklahoma.gov/health.html). #' David Bard, PI, OUHSC; 2015-2017. #' * *OSDH ParentPRO Pilot Evaluation*, federally-sponsored collaboration -#' with [OSDH](https://ok.gov/health/). +#' with [OSDH](https://oklahoma.gov/health.html). #' David Bard, PI, OUHSC; 2015-2017. -#' * *Title IV-E Waiver Project*, [HRSA/MCHB](http://mchb.hrsa.gov/)-sponsored -#' collaboration with [OKDHS](http://www.okdhs.org/); +#' * *Title IV-E Waiver Project*, [HRSA/MCHB](https://mchb.hrsa.gov/)-sponsored +#' collaboration with [OKDHS](https://www.okdhs.org/); #' David Bard, PI, OUHSC; 2014-2017. #' * *Integrative Analysis of Longitudinal Studies of Aging (IALSA)*, -#' sponsored by [NIH 5P01AG043362](http://grantome.com/grant/NIH/P01-AG043362). +#' sponsored by [NIH 5P01AG043362](https://grantome.com/grant/NIH/P01-AG043362). #' Scott Hofer, PI, University of Victoria; #' Will Beasley, PI of site-award, OUHSC; 2013-2018. #' * *Oklahoma Shared Clinical and Translational Resources*, sponsored by -#' [NIH NIGMS; U54 GM104938](http://grantome.com/grant/NIH/U54-GM104938). +#' [NIH NIGMS; U54 GM104938](https://grantome.com/grant/NIH/U54-GM104938). #' Judith A. James, PI, OUHSC; 2013-2018. #' * Additional Institutional Support from OUHSC -#' [Dept of Pediatrics](https://www.oumedicine.com/department-of-pediatrics); +#' [Dept of Pediatrics](https://medicine.ouhsc.edu/Academic-Departments/Pediatrics); #' 2013-2017. #' #' diff --git a/R/redcap-download-file-oneshot.R b/R/redcap-download-file-oneshot.R index 7567b52c..df6eef57 100644 --- a/R/redcap-download-file-oneshot.R +++ b/R/redcap-download-file-oneshot.R @@ -34,7 +34,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-download-instrument.R b/R/redcap-download-instrument.R index 2a023607..e3638232 100644 --- a/R/redcap-download-instrument.R +++ b/R/redcap-download-instrument.R @@ -29,7 +29,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-metadata-read.R b/R/redcap-metadata-read.R index 26fb2a6d..49ecc7c8 100644 --- a/R/redcap-metadata-read.R +++ b/R/redcap-metadata-read.R @@ -29,7 +29,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_codes`: A collection of -#' [http status codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes), +#' [http status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes), #' separated by semicolons. There is one code for each batch attempted. #' * `outcome_messages`: A collection of human readable strings indicating the #' operations' semicolons. There is one code for each batch attempted. In an diff --git a/R/redcap-metadata-write.R b/R/redcap-metadata-write.R index 1c43ea0f..6627c643 100644 --- a/R/redcap-metadata-write.R +++ b/R/redcap-metadata-write.R @@ -22,7 +22,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. @@ -73,7 +73,7 @@ redcap_metadata_write <- function( verbose = TRUE, config_options = NULL ) { - csv_elements <- NULL #This prevents the R CHECK NOTE: 'No visible binding for global variable Note in R CMD check'; Also see if( getRversion() >= "2.15.1" ) utils::globalVariables(names=c("csv_elements")) #http://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check; http://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when + csv_elements <- NULL #This prevents the R CHECK NOTE: 'No visible binding for global variable Note in R CMD check'; Also see if( getRversion() >= "2.15.1" ) utils::globalVariables(names=c("csv_elements")) #https://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check; https://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when checkmate::assert_character(redcap_uri, any.missing = FALSE, len = 1, pattern = "^.{1,}$") checkmate::assert_character(token , any.missing = FALSE, len = 1, pattern = "^.{1,}$") diff --git a/R/redcap-project.R b/R/redcap-project.R index 3e61d4d2..b624f2dd 100644 --- a/R/redcap-project.R +++ b/R/redcap-project.R @@ -131,5 +131,5 @@ redcap_project <- setRefClass( ) #End methods list ) #End class -# http://adv-r.had.co.nz/OO-essentials.html # nolint -# http://stackoverflow.com/questions/21875596/mapping-a-c-sharp-class-definition-to-an-r-reference-class-definition # nolint +# https://adv-r.had.co.nz/OO-essentials.html # nolint +# https://stackoverflow.com/questions/21875596/mapping-a-c-sharp-class-definition-to-an-r-reference-class-definition # nolint diff --git a/R/redcap-read-oneshot-eav.R b/R/redcap-read-oneshot-eav.R index 758882eb..56adba0d 100644 --- a/R/redcap-read-oneshot-eav.R +++ b/R/redcap-read-oneshot-eav.R @@ -65,7 +65,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-read-oneshot.R b/R/redcap-read-oneshot.R index 4ed244a3..691fcc8c 100644 --- a/R/redcap-read-oneshot.R +++ b/R/redcap-read-oneshot.R @@ -74,7 +74,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-read.R b/R/redcap-read.R index 11295cfe..cfd06e78 100644 --- a/R/redcap-read.R +++ b/R/redcap-read.R @@ -89,7 +89,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_codes`: A collection of -#' [http status codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes), +#' [http status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes), #' separated by semicolons. There is one code for each batch attempted. #' * `outcome_messages`: A collection of human readable strings indicating the #' operations' semicolons. There is one code for each batch attempted. In an diff --git a/R/redcap-report.R b/R/redcap-report.R index 4274f6b0..c80d6284 100644 --- a/R/redcap-report.R +++ b/R/redcap-report.R @@ -39,7 +39,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-survey-link-export-oneshot.R b/R/redcap-survey-link-export-oneshot.R index e00a8120..a6e85cde 100644 --- a/R/redcap-survey-link-export-oneshot.R +++ b/R/redcap-survey-link-export-oneshot.R @@ -20,7 +20,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-upload-file-oneshot.R b/R/redcap-upload-file-oneshot.R index 797c41f0..c5339c47 100644 --- a/R/redcap-upload-file-oneshot.R +++ b/R/redcap-upload-file-oneshot.R @@ -22,7 +22,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-variables.R b/R/redcap-variables.R index 14faa742..ccd57654 100644 --- a/R/redcap-variables.R +++ b/R/redcap-variables.R @@ -20,7 +20,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/redcap-write-oneshot.R b/R/redcap-write-oneshot.R index 0b11fe69..326c9eb0 100644 --- a/R/redcap-write-oneshot.R +++ b/R/redcap-write-oneshot.R @@ -30,7 +30,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. @@ -97,7 +97,7 @@ redcap_write_oneshot <- function( config_options = NULL ) { - csv_elements <- NULL #This prevents the R CHECK NOTE: 'No visible binding for global variable Note in R CMD check'; Also see if( getRversion() >= "2.15.1" ) utils::globalVariables(names=c("csv_elements")) #http://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check; http://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when + csv_elements <- NULL #This prevents the R CHECK NOTE: 'No visible binding for global variable Note in R CMD check'; Also see if( getRversion() >= "2.15.1" ) utils::globalVariables(names=c("csv_elements")) #https://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check; https://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when checkmate::assert_character(redcap_uri, any.missing=FALSE, len=1, pattern="^.{1,}$") checkmate::assert_character(token , any.missing=FALSE, len=1, pattern="^.{1,}$") diff --git a/R/redcap-write.R b/R/redcap-write.R index e2908067..746e3fe2 100644 --- a/R/redcap-write.R +++ b/R/redcap-write.R @@ -37,7 +37,7 @@ #' * `success`: A boolean value indicating if the operation was apparently #' successful. #' * `status_code`: The -#' [http status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) +#' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) #' of the operation. #' * `outcome_message`: A human readable string indicating the operation's #' outcome. diff --git a/R/retrieve-credential.R b/R/retrieve-credential.R index 3b666f68..03b014b3 100644 --- a/R/retrieve-credential.R +++ b/R/retrieve-credential.R @@ -42,7 +42,7 @@ #' Defaults to FALSE. #' @param check_token_pattern A `logical` value indicates if the token in the #' credential file is a 32-character hexadecimal string. Defaults to FALSE. -#' @param dsn A [DSN](http://en.wikipedia.org/wiki/Data_source_name) on the +#' @param dsn A [DSN](https://en.wikipedia.org/wiki/Data_source_name) on the #' local machine that points to the desired MSSQL database. Required. #' @param channel An *optional* connection handle as returned by #' [DBI::dbConnect()]. See Details below. Optional. diff --git a/README.md b/README.md index 7ba00d5c..9c1a349c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ remotes::install_github(repo="OuhscBbmc/REDCapR") The [ouhscbbmc.github.io/REDCapR](https://ouhscbbmc.github.io/REDCapR) site describes the package functions, and includes documents involving [basic operations](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html), [advanced operations](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html), [token security](https://ouhscbbmc.github.io/REDCapR/articles/SecurityDatabase.html), and [troubleshooting](https://ouhscbbmc.github.io/REDCapR/articles/TroubleshootingApiCalls.html). -Also checkout the other packages that exist for communicating with REDCap, which are listed in the [REDCap Tools](http://redcap-tools.github.io/projects/) directory. +Also checkout the other packages that exist for communicating with REDCap, which are listed in the [REDCap Tools](https://redcap-tools.github.io/projects/) directory. ### Collaborative Development @@ -58,22 +58,22 @@ 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://www.ok.gov/health/Family_Health/Family_Support_and_Prevention_Service/index.html) program. See the preliminary CQI reports (many of which use REDCapR) at http://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/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/. -* *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting ([MIECHV](http://mchb.hrsa.gov/programs/homevisiting/)) Project*. [HRSA/ACF D89MC23154](https://grants6.hrsa.gov/MCHB/DGISReports/Abstract/AbstractDetails.aspx?cbAbstractSummary=D89MC23154_2012_NonResearch_4). 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://ok.gov/health/). David Bard, PI, OUHSC; 2015-2017. -* *OSDH ParentPRO Pilot Evaluation*, federally-sponsored collaboration with [OSDH](https://ok.gov/health/). David Bard, PI, OUHSC; 2015-2017. -* *Title IV-E Waiver Project*, [HRSA/MCHB](http://mchb.hrsa.gov/)-sponsored collaboration with [OKDHS](http://www.okdhs.org/); David Bard, PI, OUHSC; 2014-2017. -* *Integrative Analysis of Longitudinal Studies of Aging (IALSA)*, sponsored by [NIH 5P01AG043362](http://grantome.com/grant/NIH/P01-AG043362). Scott Hofer, PI, University of Victoria; Will Beasley, PI of site-award, OUHSC; 2013-2018. -* *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH NIGMS; U54 GM104938](http://grantome.com/grant/NIH/U54-GM104938). Judith A. James, PI, OUHSC; 2013-2018. +* *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting ([MIECHV](https://mchb.hrsa.gov/programs/homevisiting/)) 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. +* *OSDH ParentPRO Pilot Evaluation*, federally-sponsored collaboration with [OSDH](https://oklahoma.gov/health.html). David Bard, PI, OUHSC; 2015-2017. +* *Title IV-E Waiver Project*, [HRSA/MCHB](https://mchb.hrsa.gov/)-sponsored collaboration with [OKDHS](https://www.okdhs.org/); 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). Scott Hofer, PI, University of Victoria; Will Beasley, PI of site-award, OUHSC; 2013-2018. +* *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH NIGMS; U54 GM104938](https://grantome.com/grant/NIH/U54-GM104938). Judith A. James, PI, OUHSC; 2013-2018. * *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH U54GM104938](https://hsrproject.nlm.nih.gov/view_hsrproj_record/20204379); 2020-2021. -* Additional Institutional Support from OUHSC [Dept of Pediatrics](https://www.oumedicine.com/department-of-pediatrics); 2013-2021. +* Additional Institutional Support from OUHSC [Dept of Pediatrics](https://medicine.ouhsc.edu/Academic-Departments/Pediatrics); 2013-2021. Thanks, -[Will Beasley](https://www.researchgate.net/profile/William_Beasley2), David Bard, & Thomas Wilson
-[University of Oklahoma Health Sciences Center](http://ouhsc.edu/), -[Department of Pediatrics](https://www.oumedicine.com/department-of-pediatrics), -[Biomedical & Behavioral Research Core](http://ouhsc.edu/BBMC/). +[Will Beasley](https://www.researchgate.net/profile/William-Beasley-5), David Bard, & Thomas Wilson
+[University of Oklahoma Health Sciences Center](https://ouhsc.edu/), +[Department of Pediatrics](https://medicine.ouhsc.edu/Academic-Departments/Pediatrics), +[Biomedical & Behavioral Research Core](https://ouhsc.edu/BBMC/). ### Build Status and Package Characteristics @@ -86,8 +86,8 @@ Thanks, | Key | Value | | :--- | :----- | | [License](https://choosealicense.com/) | [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) | -| [CRAN Version](https://cran.r-project.org/package=REDCapR) | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/REDCapR)](https://cran.r-project.org/package=REDCapR) | +| [CRAN Version](https://cran.r-project.org/package=REDCapR) | [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/REDCapR)](https://cran.r-project.org/package=REDCapR) | | [CRAN Rate](https://cranlogs.r-pkg.org/) | ![CRAN Pace](https://cranlogs.r-pkg.org/badges/REDCapR) | | [Zenodo Archive](https://zenodo.org/search?ln=en&p=redcapr) | [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.61990.svg)](https://doi.org/10.5281/zenodo.61990) | -| [Production Doc](https://www.rdocumentation.org/) | [![Rdoc](http://www.rdocumentation.org/badges/version/REDCapR)](http://www.rdocumentation.org/packages/REDCapR) | +| [Production Doc](https://www.rdocumentation.org/) | [![Rdoc](https://www.rdocumentation.org/badges/version/REDCapR)](https://www.rdocumentation.org/packages/REDCapR) | | [Development Doc](https://www.rdocumentation.org/) | [![Rdoc](https://img.shields.io/badge/pkgdown-GitHub.io-orange.svg?longCache=true&style=style=for-the-badge)](https://ouhscbbmc.github.io/REDCapR/) | diff --git a/_pkgdown.yml b/_pkgdown.yml index 7ab55bf3..eb68e09a 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -10,7 +10,7 @@ template: home: links: # - text: Ask a question -# href: http://discourse.mc-stan.org/ +# href: https://discourse.mc-stan.org/ development: mode: release diff --git a/documentation-for-developers/first-time-setup.md b/documentation-for-developers/first-time-setup.md index f83505ee..358e4142 100644 --- a/documentation-for-developers/first-time-setup.md +++ b/documentation-for-developers/first-time-setup.md @@ -4,18 +4,18 @@ These notes are to hep potential REDCapR contributors get their development mach Install the [latest version](https://cran.r-project.org/bin/windows/base/) of R. Before a version is submitted to CRAN, the CRAN maintainers prefer you use the [patched](https://cran.r-project.org/bin/windows/base/rpatched.html) version of R, or even the [development](https://cran.r-project.org/bin/windows/base/rdevel.html) version. These links point to the windows versions. If you're running Linux, you probably already know how to get the right version, and there's not a simply URL I can link to. ### RStudio -Although other R IDEs are available, using [RStudio](http://www.rstudio.com/ide/download/desktop) will be easier when developing REDCapR, since that the major link of the tool chain I'm used to. +Although other R IDEs are available, using [RStudio](https://www.rstudio.com/ide/download/desktop) will be easier when developing REDCapR, since that the major link of the tool chain I'm used to. ### Rtools [Rtools](https://cran.r-project.org/bin/windows/Rtools/) is the main thing that builds and checks the package being developed. CRAN maintainers like you to run the most recent version. ### LaTeX software -For Windows, the consensus seemed to be [MiKTeX](http://miktex.org/download). The full version is huge, and contains almost every possible package (LaTeX has a package system similar to R and Linux). If you install something other than the full version, and a document requires a package you don't have, it will simply prompt you to download it. +For Windows, the consensus seemed to be [MiKTeX](https://miktex.org/download). The full version is huge, and contains almost every possible package (LaTeX has a package system similar to R and Linux). If you install something other than the full version, and a document requires a package you don't have, it will simply prompt you to download it. ### qpdf -[qpdf](http://sourceforge.net/projects/qpdf/) is a command line tool that R BUILD calls. You'll never call it directly. It is used to make see if the documentation pdfs can be further compressed to save additional space. For Windows, download the zipped file from sourceforge and copy it into a permanent location (eg, in the `/Program Files/` directory.) +[qpdf](https://sourceforge.net/projects/qpdf/) is a command line tool that R BUILD calls. You'll never call it directly. It is used to make see if the documentation pdfs can be further compressed to save additional space. For Windows, download the zipped file from sourceforge and copy it into a permanent location (eg, in the `/Program Files/` directory.) -The location of the `bin` directory should be added to the OS's "PATH" environmental variable, so the executable can be found. At the time of this writing, I added `C:\Program Files\qpdf-5.0.1\bin;`. Make sure a semicolon is separating it from all the stuff before it in the PATH variable. Make sure the version number (eg, "5.0.1") matches the version of your current installation. *Apparently I needed to reboot my computer for the new path entry to be recognized (see [a stack exchanage explanation for tedious details](http://serverfault.com/a/557669)); restarting RStudio didn't work.* +The location of the `bin` directory should be added to the OS's "PATH" environmental variable, so the executable can be found. At the time of this writing, I added `C:\Program Files\qpdf-5.0.1\bin;`. Make sure a semicolon is separating it from all the stuff before it in the PATH variable. Make sure the version number (eg, "5.0.1") matches the version of your current installation. *Apparently I needed to reboot my computer for the new path entry to be recognized (see [a stack exchanage explanation for tedious details](https://serverfault.com/a/557669)); restarting RStudio didn't work.* If you don't install qpdf correctly, you'll likely receive the error message `WARNING 'qpdf' is needed for checks on size reduction of PDFs` when running R CHECK with the `--as-cran-` option. @@ -31,7 +31,7 @@ sudo apt-get install texinfo sudo apt-get install texlive sudo apt-get install texlive-fonts-extra ``` -See [texi2dvi missing](https://github.com/yihui/knitr/issues/214) and [textlive-fonts-extra](http://tex.stackexchange.com/questions/125274/error-font-ts1-zi4r-at-540-not-found) for installing. See the [R CMD Rd2pdf](http://stackoverflow.com/questions/10819959/diagnosing-r-package-build-warning-latex-errors-when-creating-pdf-version) for getting better error messages than R CMD check. +See [texi2dvi missing](https://github.com/yihui/knitr/issues/214) and [textlive-fonts-extra](https://tex.stackexchange.com/questions/125274/error-font-ts1-zi4r-at-540-not-found) for installing. See the [R CMD Rd2pdf](https://stackoverflow.com/questions/10819959/diagnosing-r-package-build-warning-latex-errors-when-creating-pdf-version) for getting better error messages than R CMD check. ### Help me add more to this diff --git a/documentation-for-developers/online-material.md b/documentation-for-developers/online-material.md index bdac7c97..7e74c974 100644 --- a/documentation-for-developers/online-material.md +++ b/documentation-for-developers/online-material.md @@ -2,11 +2,11 @@ List of Online Material ============================================== This is a running list of material we've seen online describing how to connect to REDCap with R (not necessarily with the API). If you've read or written something you'd like included, please tell us, or just edit the markdown file yourself. -* [Intro to the REDCap API](http://sburns.org/2013/07/22/intro-to-redcap-api.html): A tutorial by Scott S Burns, 2013-07-22 +* [Intro to the REDCap API](https://sburns.org/2013/07/22/intro-to-redcap-api.html): A tutorial by Scott S Burns, 2013-07-22 * [Improving Research through Advanced REDCap Interfaces](https://github.com/sburns/advanced-redcap-interfaces/blob/master/slides.md). By Scott S Burns, 2013-04-18 -* [REDCap and DDI Exporting Data and Metadata with the API](http://hdl.handle.net/1808/11047) By Larry Hoyle & Ada Van Roekel, 2013-04-03 +* [REDCap and DDI Exporting Data and Metadata with the API](https://hdl.handle.net/1808/11047) By Larry Hoyle & Ada Van Roekel, 2013-04-03 * [REDCapCustomReports](https://github.com/jeffreyhorner/REDCapCustomReports): REDCapCustomReports is a REDCap module for creating custom PDF reports written in the R language. By Jeffrey Horner, started 2013-02-15. -* [Parsing back to 'messy' API strcuture](http://stackoverflow.com/questions/12393004/parsing-back-to-messy-api-strcuture): StackOverflow question by Eric Fail, 2012-12-12 +* [Parsing back to 'messy' API strcuture](https://stackoverflow.com/questions/12393004/parsing-back-to-messy-api-strcuture): StackOverflow question by Eric Fail, 2012-12-12 * [redcap](https://github.com/jeffreyhorner/redcap): R interface to REDCap by Jeffrey Horner, started 2012-04-26. -* [R Tip - Directly Access the REDCap API from R](https://plus.google.com/+ThomasRehman/posts/U3fVCTV4EdQ) (which was moved to [here](http://www.thomasrehman.net/2011/07/14/r-tip-directly-access-the-redcap-api-from-r/)) by [Thomas Rehman](https://plus.google.com/+ThomasRehman/posts), 2011-07-14 +* [R Tip - Directly Access the REDCap API from R](https://plus.google.com/+ThomasRehman/posts/U3fVCTV4EdQ) (which was moved to [here](https://www.thomasrehman.net/2011/07/14/r-tip-directly-access-the-redcap-api-from-r/)) by [Thomas Rehman](https://plus.google.com/+ThomasRehman/posts), 2011-07-14 * [Using R and REDCap’s API to Generate Custom Project Reports](https://www.ctspedia.org/wiki/pub/CTSpedia/ReproducibleResearchMethodology/REDCap.Day.2011.TerriScott.pdf) 2011 REDCap Days diff --git a/documentation-for-developers/retired-documentation.md b/documentation-for-developers/retired-documentation.md index 965c05a9..b0c2278a 100644 --- a/documentation-for-developers/retired-documentation.md +++ b/documentation-for-developers/retired-documentation.md @@ -25,7 +25,7 @@ sudo yum install R-RODBC unixODBC-devel ### SVN -SVN is necessary if you want to commit to R-Forge (otherwise, just download the release version from CRAN and the development version from [GitHub](https://github.com/OuhscBbmc/REDCapR)). When a directory is deleted, using the command line to first [update](http://stackoverflow.com/questions/87950/how-do-you-overcome-the-svn-out-of-date-error) and then [delete](http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.delete.html) works for me. +SVN is necessary if you want to commit to R-Forge (otherwise, just download the release version from CRAN and the development version from [GitHub](https://github.com/OuhscBbmc/REDCapR)). When a directory is deleted, using the command line to first [update](https://stackoverflow.com/questions/87950/how-do-you-overcome-the-svn-out-of-date-error) and then [delete](https://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.delete.html) works for me. ``` $ svn update doc diff --git a/inst/misc/bad.credentials b/inst/misc/bad.credentials index 418e24bb..71bd0581 100644 --- a/inst/misc/bad.credentials +++ b/inst/misc/bad.credentials @@ -4,5 +4,5 @@ # are stored securely. # redcap_uri,username,project_id,token,comment -"http://bbmc.ouhsc.edu/redcap/api/","myusername","153","9A81268476645C4E5F03428B8A","simple static (read-only) test project" +"https://bbmc.ouhsc.edu/redcap/api/","myusername","153","9A81268476645C4E5F03428B8A","simple static (read-only) test project" "https://bbmc.ouhsc.edu/redcap/api/","myusername","212","D70F9ACD1EDD6F151C6EA78683944E98","simple write data" diff --git a/inst/test-data/project-longitudinal/expected/default.R b/inst/test-data/project-longitudinal/expected/default.R index b9beb48d..d04494ec 100644 --- a/inst/test-data/project-longitudinal/expected/default.R +++ b/inst/test-data/project-longitudinal/expected/default.R @@ -66,7 +66,7 @@ NA, NA, NA, NA), first_name = c("Zharko", NA, NA, NA, NA, NA, NA, NA, NA), weight = c(80, NA, NA, NA, NA, NA, 66, NA, NA, NA, NA, NA, 88, NA, NA, NA, NA, NA), bmi = c(31.3, NA, NA, NA, NA, NA, 27.1, NA, NA, NA, NA, NA, 22.2, NA, NA, NA, NA, - NA), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", + NA), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", NA, NA, NA, NA, NA, "Dissuade ecstatic and properly saw entirely sir why laughter endeavor. In on my jointure horrible margaret suitable he followed speedily. Indeed vanity excuse or mr lovers of on. By offer scale an stuff. Blush be sorry no sight. Sang lose of hour then he left find. \n\nDenote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize.", NA, NA, NA, NA, NA, "It real sent your at. Amounted all shy set why followed declared. Repeated of endeavor mr position kindness offering ignorant so up. Simplicity are melancholy preference considered saw companions. Disposal on outweigh do speedily in on. Him ham although thoughts entirely drawings. Acceptance unreserved old admiration projection nay yet him. Lasted am so before on esteem vanity oh.", NA, NA, NA, NA, NA), demographics_complete = c(2, NA, NA, diff --git a/inst/test-data/project-longitudinal/expected/filter-character.R b/inst/test-data/project-longitudinal/expected/filter-character.R index 954fa8b6..5d884f56 100644 --- a/inst/test-data/project-longitudinal/expected/filter-character.R +++ b/inst/test-data/project-longitudinal/expected/filter-character.R @@ -10,7 +10,7 @@ structure(list(study_id = 100, redcap_event_name = "enrollment_arm_1", drink___1 = 0, drink___2 = 0, drink___3 = 0, drink___4 = 1, specify_mood = 71, meds___1 = 0, meds___2 = 1, meds___3 = 0, meds___4 = 0, meds___5 = 0, height = 160, weight = 80, bmi = 31.3, - comments = "Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", + comments = "Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", demographics_complete = 2, ec_phone = NA, ec_confirmed = NA, next_of_kin_contact_name = NA, next_of_kin_contact_address = NA, next_of_kin_contact_phone = NA, next_of_kin_confirmed = NA, diff --git a/inst/test-data/project-longitudinal/expected/filter-numeric.R b/inst/test-data/project-longitudinal/expected/filter-numeric.R index 7fd6cd06..823d5851 100644 --- a/inst/test-data/project-longitudinal/expected/filter-numeric.R +++ b/inst/test-data/project-longitudinal/expected/filter-numeric.R @@ -15,7 +15,7 @@ structure(list(study_id = c(100, 220), redcap_event_name = c("enrollment_arm_1", 1), specify_mood = c(71, 29), meds___1 = c(0, 1), meds___2 = c(1, 1), meds___3 = c(0, 0), meds___4 = c(0, 0), meds___5 = c(0, 0), height = c(160, 156), weight = c(80, 66), bmi = c(31.3, - 27.1), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", + 27.1), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", "Dissuade ecstatic and properly saw entirely sir why laughter endeavor. In on my jointure horrible margaret suitable he followed speedily. Indeed vanity excuse or mr lovers of on. By offer scale an stuff. Blush be sorry no sight. Sang lose of hour then he left find. \n\nDenote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize." ), demographics_complete = c(2, 2), ec_phone = c(NA, NA), ec_confirmed = c(NA, NA), next_of_kin_contact_name = c(NA, diff --git a/inst/test-data/project-longitudinal/longitudinal-data.csv b/inst/test-data/project-longitudinal/longitudinal-data.csv index 2e1cd7c7..c854de37 100644 --- a/inst/test-data/project-longitudinal/longitudinal-data.csv +++ b/inst/test-data/project-longitudinal/longitudinal-data.csv @@ -1,5 +1,5 @@ study_id,redcap_event_name,date_enrolled,patient_document,first_name,last_name,telephone_1,email,dob,age,ethnicity,race,sex,given_birth,num_children,gym___0,gym___1,gym___2,gym___3,gym___4,aerobics___0,aerobics___1,aerobics___2,aerobics___3,aerobics___4,eat___0,eat___1,eat___2,eat___3,eat___4,drink___0,drink___1,drink___2,drink___3,drink___4,specify_mood,meds___1,meds___2,meds___3,meds___4,meds___5,height,weight,bmi,comments,demographics_complete,dialysis_unit_name,dialysis_unit_phone,dialysis_schedule_days,dialysis_schedule_time,etiology_esrd,subject_comments,contact_info_complete,height2,weight2,bmi2,prealb_b,creat_b,npcr_b,chol_b,transferrin_b,baseline_data_complete,vld1,vld2,vld3,vld4,vld5,visit_lab_data_complete,pmq1,pmq2,pmq3,pmq4,patient_morale_questionnaire_complete,vbw1,vbw2,vbw3,vbw4,vbw5,vbw6,vbw7,vbw8,vbw9,visit_blood_workup_complete,vob1,vob2,vob3,vob4,vob5,vob6,vob7,vob8,vob9,vob10,vob11,vob12,vob13,vob14,visit_observed_behavior_complete,study_comments,complete_study,withdraw_date,date_visit_4,alb_4,prealb_4,creat_4,discharge_date_4,discharge_summary_4,npcr_4,chol_4,withdraw_reason,completion_data_complete,cpq1,cpq2,cpq3,cpq4,cpq5,cpq6,cpq7,cpq8,cpq9,cpq10,cpq11,cpq12,cpq13,completion_project_questionnaire_complete -100,enrollment_arm_1,2015-04-02,,Zharko,Lenox,"(415) 555-1212",zlehnox@gmail.com,1983-09-23,31,0,4,1,,,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,71,0,1,0,0,0,160,80,31.3,"Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. On recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. Concerns greatest http://randomtextgenerator.com/",2,"(433) 345-9282",0,"Ricki Reşit","1206 Route 20 Chelmsford, MA 01824","(324) 438-8221",1,2,200,234,58.5,43,355,23,3.5,3.66,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +100,enrollment_arm_1,2015-04-02,,Zharko,Lenox,"(415) 555-1212",zlehnox@gmail.com,1983-09-23,31,0,4,1,,,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,71,0,1,0,0,0,160,80,31.3,"Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. On recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. Concerns greatest https://randomtextgenerator.com/",2,"(433) 345-9282",0,"Ricki Reşit","1206 Route 20 Chelmsford, MA 01824","(324) 438-8221",1,2,200,234,58.5,43,355,23,3.5,3.66,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,dose_1_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,2,1,1,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,visit_1_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5.6,3.5,66.7,33.5,.34,2,1,0,0,0,0,.4334,23.3,23.3,.988,.342,"0. AM",2,0,1,1,0,0,1,0,1,0,"him absolute entrance nay. Door neat week do find past he. Be no surprise he honoured indulged. Unpacked endeavor six steepest had husbands her. Painted no or affixed it so civilly. Exposed neither pressed so cottage as proceed at offices. Nay they gone sir game four. Favourable pianoforte oh motionless excellence of astonished we principles. Warrant present garrets limited cordial in inquiry to. Supported me sweetness behaviour shameless excellent so arranging. The him father parish looked has sooner.",0,0,1,0,1,0,"The him father parish looked has sooner. Attachment frequently gay terminated son. You greater nay use prudent placing. Passage to so distant behaved natural between do talking. Friends off her windows painful. Still gay event you being think nay for. In three if aware he point it. Effects warrant me by no on feeling settled resolve. ",0,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,dose_2_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,1,0,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/inst/test-data/repeating-instruments/repeating-instruments-full.xml b/inst/test-data/repeating-instruments/repeating-instruments-full.xml index 544472a3..ce1a95ec 100644 --- a/inst/test-data/repeating-instruments/repeating-instruments-full.xml +++ b/inst/test-data/repeating-instruments/repeating-instruments-full.xml @@ -1,5 +1,5 @@ - + REDCapR Repeating Instruments --See https://github.com/OuhscBbmc/REDCapR @@ -208,4 +208,4 @@ - \ No newline at end of file + diff --git a/man/REDCapR-package.Rd b/man/REDCapR-package.Rd index 46cff714..4ac55799 100644 --- a/man/REDCapR-package.Rd +++ b/man/REDCapR-package.Rd @@ -5,7 +5,7 @@ \alias{REDCapR-package} \alias{REDCapR} \title{R utilities for interacting with a REDCap data system -\url{http://www.project-redcap.org/}} +\url{https://www.project-redcap.org/}} \description{ Comprehensive documentation is also available at https://ouhscbbmc.github.io/REDCapR/. @@ -15,7 +15,7 @@ following projects. We appreciate the support. \itemize{ \item \emph{OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting -(\href{http://mchb.hrsa.gov/programs/homevisiting/}{MIECHV}) Project}. +(\href{https://mchb.hrsa.gov/programs/homevisiting/}{MIECHV}) Project}. \href{https://grants6.hrsa.gov/MCHB/DGISReports/Abstract/AbstractDetails.aspx?cbAbstractSummary=D89MC23154_2012_NonResearch_4}{HRSA/ACF D89MC23154}. David Bard, PI, OUHSC; 2011-2015. \item \emph{Independent Evaluation of the State of OK MIECHV Evidence Based Home @@ -25,18 +25,18 @@ David Bard, PI, OUHSC; 2015-2017. \item \emph{OSDH ParentPRO Pilot Evaluation}, federally-sponsored collaboration with \href{https://ok.gov/health/}{OSDH}. David Bard, PI, OUHSC; 2015-2017. -\item \emph{Title IV-E Waiver Project}, \href{http://mchb.hrsa.gov/}{HRSA/MCHB}-sponsored -collaboration with \href{http://www.okdhs.org/}{OKDHS}; +\item \emph{Title IV-E Waiver Project}, \href{https://mchb.hrsa.gov/}{HRSA/MCHB}-sponsored +collaboration with \href{https://www.okdhs.org/}{OKDHS}; David Bard, PI, OUHSC; 2014-2017. \item \emph{Integrative Analysis of Longitudinal Studies of Aging (IALSA)}, -sponsored by \href{http://grantome.com/grant/NIH/P01-AG043362}{NIH 5P01AG043362}. +sponsored by \href{https://grantome.com/grant/NIH/P01-AG043362}{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 -\href{http://grantome.com/grant/NIH/U54-GM104938}{NIH NIGMS; U54 GM104938}. +\href{https://grantome.com/grant/NIH/U54-GM104938}{NIH NIGMS; U54 GM104938}. Judith A. James, PI, OUHSC; 2013-2018. \item Additional Institutional Support from OUHSC -\href{https://www.oumedicine.com/department-of-pediatrics}{Dept of Pediatrics}; +\href{https://medicine.ouhsc.edu/Academic-Departments/Pediatrics}{Dept of Pediatrics}; 2013-2017. } } diff --git a/man/figures/logo.svg b/man/figures/logo.svg index 44f4b857..c136446b 100644 --- a/man/figures/logo.svg +++ b/man/figures/logo.svg @@ -1,16 +1,16 @@ - + image/svg+xml + rdf:resource="https://purl.org/dc/dcmitype/StillImage" /> diff --git a/man/redcap_download_file_oneshot.Rd b/man/redcap_download_file_oneshot.Rd index c3a25d83..23a1d6fb 100644 --- a/man/redcap_download_file_oneshot.Rd +++ b/man/redcap_download_file_oneshot.Rd @@ -65,7 +65,7 @@ Currently, a list is returned with the following elements, \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_download_instrument.Rd b/man/redcap_download_instrument.Rd index cf49476b..bc401996 100644 --- a/man/redcap_download_instrument.Rd +++ b/man/redcap_download_instrument.Rd @@ -56,7 +56,7 @@ Currently, a list is returned with the following elements, \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_metadata_read.Rd b/man/redcap_metadata_read.Rd index 323b3e4c..19646232 100644 --- a/man/redcap_metadata_read.Rd +++ b/man/redcap_metadata_read.Rd @@ -49,7 +49,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_codes}: A collection of -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status codes}, +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status codes}, separated by semicolons. There is one code for each batch attempted. \item \code{outcome_messages}: A collection of human readable strings indicating the operations' semicolons. There is one code for each batch attempted. In an diff --git a/man/redcap_metadata_write.Rd b/man/redcap_metadata_write.Rd index 77adb101..fb54d3fd 100644 --- a/man/redcap_metadata_write.Rd +++ b/man/redcap_metadata_write.Rd @@ -36,7 +36,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_read.Rd b/man/redcap_read.Rd index 0cbe28de..5bce23f1 100644 --- a/man/redcap_read.Rd +++ b/man/redcap_read.Rd @@ -144,7 +144,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_codes}: A collection of -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status codes}, +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status codes}, separated by semicolons. There is one code for each batch attempted. \item \code{outcome_messages}: A collection of human readable strings indicating the operations' semicolons. There is one code for each batch attempted. In an diff --git a/man/redcap_read_oneshot.Rd b/man/redcap_read_oneshot.Rd index 4a82dd52..c230d6fb 100644 --- a/man/redcap_read_oneshot.Rd +++ b/man/redcap_read_oneshot.Rd @@ -126,7 +126,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_read_oneshot_eav.Rd b/man/redcap_read_oneshot_eav.Rd index 496489b5..3d72be0a 100644 --- a/man/redcap_read_oneshot_eav.Rd +++ b/man/redcap_read_oneshot_eav.Rd @@ -103,7 +103,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_report.Rd b/man/redcap_report.Rd index bbd97a06..77ef5611 100644 --- a/man/redcap_report.Rd +++ b/man/redcap_report.Rd @@ -66,7 +66,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_survey_link_export_oneshot.Rd b/man/redcap_survey_link_export_oneshot.Rd index 5aec8ffe..f5d6efa3 100644 --- a/man/redcap_survey_link_export_oneshot.Rd +++ b/man/redcap_survey_link_export_oneshot.Rd @@ -41,7 +41,7 @@ Currently, a list is returned with the following elements, \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_upload_file_oneshot.Rd b/man/redcap_upload_file_oneshot.Rd index b0432c7c..e1b3e71b 100644 --- a/man/redcap_upload_file_oneshot.Rd +++ b/man/redcap_upload_file_oneshot.Rd @@ -45,7 +45,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_variables.Rd b/man/redcap_variables.Rd index 75187629..64f2f457 100644 --- a/man/redcap_variables.Rd +++ b/man/redcap_variables.Rd @@ -29,7 +29,7 @@ in the REDCap dataset. \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_write.Rd b/man/redcap_write.Rd index 27d1e3ba..fc25da25 100644 --- a/man/redcap_write.Rd +++ b/man/redcap_write.Rd @@ -64,7 +64,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/redcap_write_oneshot.Rd b/man/redcap_write_oneshot.Rd index d785ac55..31c2db9e 100644 --- a/man/redcap_write_oneshot.Rd +++ b/man/redcap_write_oneshot.Rd @@ -51,7 +51,7 @@ Currently, a list is returned with the following elements: \item \code{success}: A boolean value indicating if the operation was apparently successful. \item \code{status_code}: The -\href{http://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} +\href{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}{http status code} of the operation. \item \code{outcome_message}: A human readable string indicating the operation's outcome. diff --git a/man/retrieve_credential.Rd b/man/retrieve_credential.Rd index 9abe999e..a4fd16d2 100644 --- a/man/retrieve_credential.Rd +++ b/man/retrieve_credential.Rd @@ -50,7 +50,7 @@ credential file is a 32-character hexadecimal string. Defaults to FALSE.} campus. This allows one credential system to accommodate multiple instances on campus. Required} -\item{dsn}{A \href{http://en.wikipedia.org/wiki/Data_source_name}{DSN} on the +\item{dsn}{A \href{https://en.wikipedia.org/wiki/Data_source_name}{DSN} on the local machine that points to the desired MSSQL database. Required.} \item{channel}{An \emph{optional} connection handle as returned by diff --git a/playgrounds/HttrPlayground.R b/playgrounds/HttrPlayground.R index 799cb596..cd13ca6b 100644 --- a/playgrounds/HttrPlayground.R +++ b/playgrounds/HttrPlayground.R @@ -2,7 +2,7 @@ rm(list=ls(all=TRUE)) #Clear the variables from previous runs. library(httr) -redcap_uri <- "http://www.redcapplugins.org/redcap_v6.5.0/API/" +redcap_uri <- "https://www.redcapplugins.org/redcap_v6.5.0/API/" token <- "D96029BFCE8FFE76737BFC33C2BCC72E" #For `UnitTestPhiFree` account and the simple project (pid 27) on Vandy's test server. @@ -45,7 +45,7 @@ result$headers$statusmessage raw_text <- httr::content(result, "text") result <- httr::POST( - url = "http://httpbin.org/post", + url = "https://httpbin.org/post", body = "A simple text string", config = httr::config(ssl_verifypeer=FALSE) ) @@ -150,4 +150,4 @@ RCurl::httpGET(url = "https://bbmc.ouhsc.edu/redcap/plugins/redcapr/no_auth_test cert_location <- system.file("cacert.pem", package="openssl") file.exists(cert_location) -httr::url_ok("http://bbmc.ouhsc.edu/redcap/plugins/redcapr/no_auth_test.php", config=list(cainfo=cert_location, sslversion=3)) +httr::url_ok("https://bbmc.ouhsc.edu/redcap/plugins/redcapr/no_auth_test.php", config=list(cainfo=cert_location, sslversion=3)) diff --git a/playgrounds/MetadataPlayground.R b/playgrounds/MetadataPlayground.R index 0db781ac..90f62f85 100644 --- a/playgrounds/MetadataPlayground.R +++ b/playgrounds/MetadataPlayground.R @@ -70,7 +70,7 @@ labels <- mapply(function (start, len) substr(choices, start, start+len-1), -#http://stackoverflow.com/questions/952275/regex-group-capture-in-r +#https://stackoverflow.com/questions/952275/regex-group-capture-in-r ids <- mapply(function (start, len) as.integer(substr(choices, start, start+len-1)), attr(match_id, "capture.start")[, 1], attr(match_id, "capture.length")[, 1] diff --git a/playgrounds/PlaygroundColumnSanitize.R b/playgrounds/PlaygroundColumnSanitize.R index e1ae5ef1..cf682365 100644 --- a/playgrounds/PlaygroundColumnSanitize.R +++ b/playgrounds/PlaygroundColumnSanitize.R @@ -21,7 +21,7 @@ redcap_column_sanitize <- function( d, column_names=colnames(d) ) { #Demote unicode characters to ASCII - old_characters <- base::c("ÄÁÀÂÇÉÈÊËÍÎÏÑÓÖÔØÚÜÙÛŸÝ") #Pasted from http://www.periodni.com/unicode_utf-8_encoding.html + old_characters <- base::c("ÄÁÀÂÇÉÈÊËÍÎÏÑÓÖÔØÚÜÙÛŸÝ") #Pasted from https://www.periodni.com/unicode_utf-8_encoding.html new_characters <- base::c("AAAACEEEEIIINOOOOUUUUYY") old_characters <- base::paste0(old_characters, base::tolower(old_characters)) new_characters <- base::paste0(new_characters, base::tolower(new_characters)) diff --git a/playgrounds/SSL3Playground.R b/playgrounds/SSL3Playground.R index 9015c372..6bbf3ec1 100644 --- a/playgrounds/SSL3Playground.R +++ b/playgrounds/SSL3Playground.R @@ -13,7 +13,7 @@ token <- "D96029BFCE8FFE76737BFC33C2BCC72E" #For `UnitTestPhiFree` account and t library(RCurl) # SO post: -# http://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r +# https://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r cert_location <- system.file("cacert.pem", package="openssl") file.exists(cert_location) options(RCurlOptions = list(cainfo=cert_location)) diff --git a/playgrounds/retired/retrieve-token.R b/playgrounds/retired/retrieve-token.R index 007b0b89..edba703a 100644 --- a/playgrounds/retired/retrieve-token.R +++ b/playgrounds/retired/retrieve-token.R @@ -5,7 +5,7 @@ #' #' @description This function will soon be deprecated; please transition to [retrieve_token_mssql()]. These functions are not essential to calling the REDCap API, but instead are functions that help manage tokens securely. #' -#' @param dsn A [DSN](http://en.wikipedia.org/wiki/Data_source_name) on the local machine that points to the desired MSSQL database. Required. +#' @param dsn A [DSN](https://en.wikipedia.org/wiki/Data_source_name) on the local machine that points to the desired MSSQL database. Required. #' @param project_name The friendly/shortened name given to the REDCap project in the MSSQL table. Notice this isn't necessarily the same name used by REDCap. Required #' @param channel An *optional* connection handle as returned by [RODBC::odbcConnect()]. See Details below. Optional. diff --git a/playgrounds/ssl_playground.R b/playgrounds/ssl_playground.R index 188b0a58..6d600973 100644 --- a/playgrounds/ssl_playground.R +++ b/playgrounds/ssl_playground.R @@ -13,7 +13,7 @@ redcap_uri <- "https://www.redcapplugins.org/api/" token <- "D96029BFCE8FFE76737BFC33C2BCC72E" #For `UnitTestPhiFree` account and the simple project (pid 27) on Vandy's test server. # SO post: -# http://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r +# https://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r cert_location <- system.file("cacert.pem", package="openssl") file.exists(cert_location) @@ -68,7 +68,7 @@ content(httr_raw, type = "text") ########################################################################## library(RCurl) -# SO post: http://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r +# SO post: https://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r file.exists(system.file("ssl-certs/mozilla-ca-root.crt", package="REDCapR")) rcurl_raw <- RCurl::postForm( diff --git a/tests/testthat/test-read-errors.R b/tests/testthat/test-read-errors.R index a84e78fa..74e57529 100644 --- a/tests/testthat/test-read-errors.R +++ b/tests/testthat/test-read-errors.R @@ -3,13 +3,13 @@ library(testthat) credential <- retrieve_credential_testing() test_that("One Shot: Bad Uri -Not HTTPS", { - expected_message_411 <- "\nLength Required\n\n

Length Required

\n

HTTP Error 411. The request must be chunked or have a content length.

\n\n" + expected_message_411 <- "\nLength Required\n\n

Length Required

\n

HTTP Error 411. The request must be chunked or have a content length.

\n\n" expected_message_501 <- "The requested method is not implemented." expect_message( returned_object <- redcap_read_oneshot( - redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "https://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) @@ -24,7 +24,7 @@ test_that("One Shot: Bad Uri -Not HTTPS", { }) test_that("One Shot: Bad Uri -wrong address", { - expected_message <- "\n\n\n\n404 - File or directory not found.\n\n\n\n

Server Error

\n
\n
\n

404 - File or directory not found.

\n

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

\n
\n
\n\n\n" + expected_message <- "\n\n\n\n404 - File or directory not found.\n\n\n\n

Server Error

\n
\n
\n

404 - File or directory not found.

\n

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

\n
\n
\n\n\n" expect_message( returned_object <- @@ -48,7 +48,7 @@ test_that("Batch: Bad Uri -Not HTTPS", { expect_message( returned_object <- redcap_read( - redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "https://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) diff --git a/tests/testthat/test-read-russian.R b/tests/testthat/test-read-russian.R index 2b4ba7c4..e8dc4440 100644 --- a/tests/testthat/test-read-russian.R +++ b/tests/testthat/test-read-russian.R @@ -17,7 +17,7 @@ test_that("Russian Recruit", { # expected_multiple <- c("a", "b", "c") # Encoding(expected_multiple) <- "latin1" # Sys.getlocale() - # Experiment w/ Joe Cheng's answer at http://stackoverflow.com/questions/5031630/how-to-source-r-file-saved-using-utf-8-encoding + # Experiment w/ Joe Cheng's answer at https://stackoverflow.com/questions/5031630/how-to-source-r-file-saved-using-utf-8-encoding # expect_equal(d$recruitment_other[1], expected_single) # expect_equal(d$recruitment_other, expected_multiple) diff --git a/utility/refresh.R b/utility/refresh.R index 162605ae..320cecef 100644 --- a/utility/refresh.R +++ b/utility/refresh.R @@ -1,6 +1,6 @@ rm(list=ls(all.names=TRUE)) deviceType <- ifelse(R.version$os=="linux-gnu", "X11", "windows") -options(device = deviceType) #http://support.rstudio.org/help/discussions/problems/80-error-in-function-only-one-rstudio-graphics-device-is-permitted +options(device = deviceType) #https://support.rstudio.org/help/discussions/problems/80-error-in-function-only-one-rstudio-graphics-device-is-permitted devtools::document() devtools::check_man() #Should return NULL @@ -36,7 +36,7 @@ test_results_not_checked <- testthat::test_dir("./tests/manual/") # devtools::check(force_suggests = FALSE) devtools::check(cran=TRUE) -# devtools::check_rhub(email="wibeasley@hotmail.com") +devtools::check_rhub(email="wibeasley@hotmail.com") # devtools::check_win_devel() # CRAN submission policies encourage the development version # revdepcheck::revdep_check(num_workers = 4) # devtools::release(check=FALSE) #Careful, the last question ultimately uploads it to CRAN, where you can't delete/reverse your decision. diff --git a/vignettes/BasicREDCapROperations.Rmd b/vignettes/BasicREDCapROperations.Rmd index b35a907e..b0ab1c1a 100644 --- a/vignettes/BasicREDCapROperations.Rmd +++ b/vignettes/BasicREDCapROperations.Rmd @@ -9,7 +9,7 @@ vignette: > %\VignetteEncoding{UTF-8} --- -This vignette covers the the basic functions exposed by the [`httr`](https://github.com/hadley/httr) and [`curl`](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](http://www.project-redcap.org/) through its API. +This vignette covers the the basic functions exposed by the [`httr`](https://github.com/hadley/httr) and [`curl`](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](https://www.project-redcap.org/) through its API. Reading REDCap Data ================================================================== @@ -171,7 +171,7 @@ The examples above have shown only the resulting `data.frame`, by specifying `$d 1. The `data` object has the `data.frame`, as in the previous examples. 1. The `success` boolean value indicates if `redcap_read_oneshot` believes the operation completed as intended. -1. The `status_codes` is a collection of [http status codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes), separated by semicolons. There is one code for each batch attempted. +1. The `status_codes` is a collection of [http status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes), separated by semicolons. There is one code for each batch attempted. 1. The `outcome_messages`: A collection of human readable strings indicating the operations' semicolons. There is one code for each batch attempted. In an unsuccessful operation, it should contain diagnostic information. 1. The `records_collapsed` field passed to the API. This shows which record subsets, if any, were requested. 1. The `fields_collapsed` fields passed to the API. This shows which field subsets, if any, were requested. diff --git a/vignettes/SecurityDatabase.Rmd b/vignettes/SecurityDatabase.Rmd index 19f0ed65..29b7bd0b 100644 --- a/vignettes/SecurityDatabase.Rmd +++ b/vignettes/SecurityDatabase.Rmd @@ -19,7 +19,7 @@ This database contains the tokens and other sensitive content (such as passwords Create a DSN on each client ======================================== -After executing the SQL code in an existing database, create an ODBC [DSN](http://en.wikipedia.org/wiki/Data_source_name) on *each* client machine that calls the database. Download the most recent drivers (as of Aug 2018, the [most recent version is 17](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server) for Windows and Linux), then run the wizard. Many values in the wizard will remain at the default values. Here are the important ones to change. +After executing the SQL code in an existing database, create an ODBC [DSN](https://en.wikipedia.org/wiki/Data_source_name) on *each* client machine that calls the database. Download the most recent drivers (as of Aug 2018, the [most recent version is 17](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server) for Windows and Linux), then run the wizard. Many values in the wizard will remain at the default values. Here are the important ones to change. 1. Set the DSN's `name` field to whatever is used in the repository's R code. 2. Set the authenticity method to `Integrated Windows authentication`. @@ -164,15 +164,15 @@ print 'Step #5 executed'; print '' ----------------------------------------------------------------------- -- REFERENCES & NOTES --The @qualified_user_name must have both (a) the 'OUHSC' domain qualification, and (b) the square brackets (to escape the backslash). - --Using sp_executesql to add users: http://www.sqlservercentral.com/Forums/Topic497615-359-1.aspx - --Check if a server login exists: http://stackoverflow.com/questions/37275/sql-query-for-logins - --Retrieve database users: http://stackoverflow.com/questions/2445444/how-to-get-a-list-of-users-for-all-instances-databases - --Concatenating strings: http://blog.sqlauthority.com/2010/11/25/sql-server-concat-function-in-sql-server-sql-concatenation/ - --DROP USER from database: http://msdn.microsoft.com/en-us/library/ms189438.aspx - --DROP LOGIN from server: http://msdn.microsoft.com/en-us/library/ms188012.aspx - --Declaring variables (eg, the username above): http://technet.microsoft.com/en-us/library/aa258839.aspx - --A different (& non-dynamic) way to establish a user: http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/index.jsp?topic=%2Fcom.ibm.wbpm.imuc.sbpm.doc%2Ftopics%2Fdb_create_users_nd_aix.html - --If the variable has to cross a 'GO' (which the current version of the script doesn't need): http://stackoverflow.com/questions/937336/is-there-a-way-to-persist-a-variable-across-a-go + --Using sp_executesql to add users: https://www.sqlservercentral.com/Forums/Topic497615-359-1.aspx + --Check if a server login exists: https://stackoverflow.com/questions/37275/sql-query-for-logins + --Retrieve database users: https://stackoverflow.com/questions/2445444/how-to-get-a-list-of-users-for-all-instances-databases + --Concatenating strings: https://blog.sqlauthority.com/2010/11/25/sql-server-concat-function-in-sql-server-sql-concatenation/ + --DROP USER from database: https://msdn.microsoft.com/en-us/library/ms189438.aspx + --DROP LOGIN from server: https://msdn.microsoft.com/en-us/library/ms188012.aspx + --Declaring variables (eg, the username above): https://technet.microsoft.com/en-us/library/aa258839.aspx + --A different (& non-dynamic) way to establish a user: https://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/index.jsp?topic=%2Fcom.ibm.wbpm.imuc.sbpm.doc%2Ftopics%2Fdb_create_users_nd_aix.html + --If the variable has to cross a 'GO' (which the current version of the script doesn't need): https://stackoverflow.com/questions/937336/is-there-a-way-to-persist-a-variable-across-a-go ``` Transfer Credentials diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index 230d6293..58e44698 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -11,7 +11,7 @@ vignette: > # - images/EmailVerified.png --- -There are many links in the pipeline between your institution's [REDCap](http://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as ([redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](http://pycap.readthedocs.org/en/latest/) in Python). +There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as ([redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.org/en/latest/) in Python). Language Agnostic ================================================================== @@ -60,7 +60,7 @@ If all these checks pass, proceed to the next section. If not, start by consult Reading ------------------------------------------------------------------ -This section examines potential problems that occur after data leaves a working server, but before it is handled by their programming language (*e.g.*, Python and R). [Postman](http://www.getpostman.com/) is a Chrome plugin recommended by [several](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/eYK_SLzW2k4/0hmf8vWLpdAJ) [people](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/RdLeRFGqzbg/WgdjTBLph1kJ) that makes troubleshooting much more efficient. +This section examines potential problems that occur after data leaves a working server, but before it is handled by their programming language (*e.g.*, Python and R). [Postman](https://www.getpostman.com/) is a Chrome plugin recommended by [several](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/eYK_SLzW2k4/0hmf8vWLpdAJ) [people](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/RdLeRFGqzbg/WgdjTBLph1kJ) that makes troubleshooting much more efficient. ```{r PostmanScreenshot, echo=FALSE, out.extra='style="fig.width=800px"'} knitr::include_graphics("images/PostmanScreenshot.png") @@ -72,7 +72,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") At the bottom of the playground page, the interface attempts to translate your specific API call to different languages, like Python and R. These suggestions are usually correct, but inspect it critically, as you would for any auto-generated script. -1. **Is Postman installed and operating correctly?** If it helps to start with a different REDCap server, you can use this dummy project containing fake data hosted by the [OUHSC BBMC](http://ouhsc.edu/bbmc/). The url is `https://bbmc.ouhsc.edu/redcap/api/`. There are three key-value pairs: (1) the 'token' is `9A81268476645C4E5F03428B8AC3AA7B`, (2) the 'content' is `record`, and (3) the 'format' should be `CSV`. When checking your own server, the token value should change, but the content and format should not. It should return five records in a CSV format. The 'status' should be `200 OK`. The result should look roughly like this. Notice the line breaks were included in the text values themselves. +1. **Is Postman installed and operating correctly?** If it helps to start with a different REDCap server, you can use this dummy project containing fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/). The url is `https://bbmc.ouhsc.edu/redcap/api/`. There are three key-value pairs: (1) the 'token' is `9A81268476645C4E5F03428B8AC3AA7B`, (2) the 'content' is `record`, and (3) the 'format' should be `CSV`. When checking your own server, the token value should change, but the content and format should not. It should return five records in a CSV format. The 'status' should be `200 OK`. The result should look roughly like this. Notice the line breaks were included in the text values themselves. ```csv record_id,name_first,name_last,address,telephone,email,dob,age,ethnicity,race,sex,height,weight,bmi,comments,demographics_complete @@ -95,7 +95,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") 1. **Can an administrator query the API successfully with Postman with the admin token?** As an administrator, create an account for yourself, and verify that your token works on your server and project. -1. **Can an administrator query the API successfully with Postman with the user's token?** Use [Postman](http://www.getpostman.com/) as before, but replace your token with the user's token. Once the whole problem is solved, reissue new API tokens to both you and the user. +1. **Can an administrator query the API successfully with Postman with the user's token?** Use [Postman](https://www.getpostman.com/) as before, but replace your token with the user's token. Once the whole problem is solved, reissue new API tokens to both you and the user. 1. **Can a user query the API successfully with Postman with the their own token?** The values you enter should be exactly the same as those entered in the previous step. A failure here (assuming the previous step was successful) suggests a network or firewall issue. If the server is behind your institution's firewall, verify the you are connecting successfully through the VPN. @@ -105,7 +105,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") curl -X POST -H "Cache-Control: no-cache" -F "token=9A81268476645C4E5F03428B8AC3AA7B" -F "content=record" -F "format=csv" "https://bbmc.ouhsc.edu/redcap/api/" ``` -If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](http://pycap.readthedocs.org/en/latest/) in Python). +If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.org/en/latest/) in Python). Writing ------------------------------------------------------------------ @@ -306,7 +306,7 @@ If you're not using REDCapR, you can skip this section and proceed to "Exporting If this fails, see "Problems in the project's metadata/dictionary" under [Common Gotchas](#gotchas-agnostic) above. A problematic data dictionary may produce the error `Error in inherits(ds, "data.frame") : object 'ds' not found` when calling `REDCapR::redcap_metadata_read()`. -1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](http://ouhsc.edu/bbmc/) as in the previous section. +1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/) as in the previous section. ```r library(REDCapR) # Load the package into the current R session. @@ -401,7 +401,7 @@ If you're not using redcapAPI, you can skip this section and proceed to 'Importi Developmental versions may be available on GitHub. ```r - install.packages("remotes", repos = "http://cran.rstudio.com") + install.packages("remotes", repos = "https://cran.rstudio.com") remotes::install_github(repo = "nutterb/redcapAPI") ``` @@ -423,7 +423,7 @@ If you're not using redcapAPI, you can skip this section and proceed to 'Importi If this fails, see "Problems in the project's metadata/dictionary." under [Gotchas](#gotchas-agnostic) above -1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](http://ouhsc.edu/bbmc/) as in the previous section. +1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/) as in the previous section. ```r library(redcapAPI) # Load the package into the current R session. @@ -494,16 +494,16 @@ Troubleshooting Strategies Resources ------------------------------------------------------------------ -* REDCap is used in many environments, and it's not surprising that a lot of libraries have been developed to cater to different scenarios and languages. An active list is maintained at [REDCap-Tools](http://redcap-tools.github.io/projects/). In an entry needs to be added, please notify us; instructions are found at the bottom of the page. +* REDCap is used in many environments, and it's not surprising that a lot of libraries have been developed to cater to different scenarios and languages. An active list is maintained at [REDCap-Tools](https://redcap-tools.github.io/projects/). In an entry needs to be added, please notify us; instructions are found at the bottom of the page. * The basic API documentation is available on your REDCap server, typically at ``` - http://<*your server name*>/redcap/api/help + https://<*your server name*>/redcap/api/help ``` * If you have access to the REDCap wiki, some newer examples might exist at . The official documentation can be found on the `API Help Page` and `API Examples' pages on the REDCap wiki (*i.e.*, and ). If you do not have an account for the wiki, please ask your campus REDCap administrator to send you the static material. -* Scott Burns, the primary developer of [PyCap](https://github.com/redcap-tools/PyCap) has a good intro at http://sburns.org/2013/07/22/intro-to-redcap-api.html +* Scott Burns, the primary developer of [PyCap](https://github.com/redcap-tools/PyCap) has a good intro at https://sburns.org/2013/07/22/intro-to-redcap-api.html * Benjamin Nutter, the primary developer of [redcapAPI](https://github.com/nutterb/redcapAPI/wiki) has a good wiki at https://github.com/nutterb/redcapAPI/wiki * In addition to this troubleshooting document, REDCapR has vignettes that covers its [basic](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) and [advanced](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html) operations. diff --git a/vignettes/advanced-redcapr-operations.Rmd b/vignettes/advanced-redcapr-operations.Rmd index 3b73bf58..6de46a2f 100644 --- a/vignettes/advanced-redcapr-operations.Rmd +++ b/vignettes/advanced-redcapr-operations.Rmd @@ -11,7 +11,7 @@ vignette: > %\VignetteEncoding{UTF-8} --- -This vignette covers the the less-typical uses of [REDCapR](https://github.com/OuhscBbmc/REDCapR) to interact with [REDCap](http://www.project-redcap.org/) through its API. +This vignette covers the the less-typical uses of [REDCapR](https://github.com/OuhscBbmc/REDCapR) to interact with [REDCap](https://www.project-redcap.org/) through its API. ```{r set_options, echo=FALSE, results='hide'} report_render_start_time <- Sys.time() @@ -166,7 +166,7 @@ ds_wide_2 <- ds_wide_2 ``` -Lots of packages and documentation exist. Our current preference is the [tidyverse approach](https://tidyr.tidyverse.org/articles/pivot.html) to pivoting, but the [data.table approach](https://www.r-bloggers.com/creating-blazing-fast-pivot-tables-from-r-with-data-table-now-with-subtotals-using-grouping-sets/) is worth considering if you're comfortable with that package. This [Stack Overflow post](https://stackoverflow.com/questions/10589693/convert-data-from-long-format-to-wide-format-with-multiple-measure-columns/) describes several ways. We recommend against the [reshape](https://CRAN.R-project.org/package=reshape) and [reshape2](https://CRAN.R-project.org/package=reshape2) packages, because their developers have replaced them with the [tidyr](https://CRAN.R-project.org/package=tidyr) functions described above. +Lots of packages and documentation exist. Our current preference is the [tidyverse approach](https://tidyr.tidyverse.org/articles/pivot.html) to pivoting, but the [data.table approach](https://www.r-bloggers.com/2019/03/creating-blazing-fast-pivot-tables-from-r-with-data-table-now-with-subtotals-using-grouping-sets/) is worth considering if you're comfortable with that package. This [Stack Overflow post](https://stackoverflow.com/questions/10589693/convert-data-from-long-format-to-wide-format-with-multiple-measure-columns/) describes several ways. We recommend against the [reshape](https://CRAN.R-project.org/package=reshape) and [reshape2](https://CRAN.R-project.org/package=reshape2) packages, because their developers have replaced them with the [tidyr](https://CRAN.R-project.org/package=tidyr) functions described above. Query the Underlying MySQL Database ================================================================== @@ -206,7 +206,7 @@ where SSL Options ================================================================== -The official [cURL site](http://curl.haxx.se) discusses the process of using SSL to verify the server being connected to. +The official [cURL site](https://curl.se/) discusses the process of using SSL to verify the server being connected to. Use the SSL cert file that come with the `openssl` package. diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 6504c0b9..3979baf9 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -1,7 +1,9 @@ --- title: "Typical REDCap Workflow for a Data Analyst" author: Will Beasley, Geneva Marshall, & Thomas Wilson, [Biomedical & Behavior Methodology Core](https://ouhsc.edu/bbmc/team/), OUHSC Pediatrics -output: rmarkdown::html_vignette +output: + rmarkdown::html_vignette: + md_extensions: -autolink_bare_uris vignette: > %\VignetteIndexEntry{Typical REDCap Workflow for a Data Analyst} %\VignetteEngine{knitr::rmarkdown} @@ -45,7 +47,7 @@ For this vignette, we'll use a fake dataset hosted at "https://bbmc.ouhsc.edu/re Note to REDCap Admins: -> For [`redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html) 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()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read_oneshot.html). To grant the appropriate permissions: +> For [`REDCapR::redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html) to function properly, the user must have Export permissions for the 'Full Data Set'. Users with only 'De-Identified' export privileges can still use [`REDCapR::redcap_read_oneshot()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read_oneshot.html). To grant the appropriate permissions: > > * go to 'User Rights' in the REDCap project site, > * select the desired user, and then select 'Edit User Privileges', @@ -287,6 +289,6 @@ Reading record data is only one API capability. REDCapR [exposes 20+ API functi Notes =================================== -This vignette was originally designed for a 2021 R/Medicine REDCap workshop with [Peter Higgins](http://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 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://hsrproject.nlm.nih.gov/view_hsrproj_record/20204379) to the [Oklahoma Shared Clinical and Translational Resource)](https://osctr.ouhsc.edu). From 6492e689b962f2b413bd074d47b809339b7369b8 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 14:33:46 -0500 Subject: [PATCH 06/14] more links ref #345 --- DESCRIPTION | 2 +- R/REDCapR-package.R | 4 ++-- README.md | 10 +++++----- man/REDCapR-package.Rd | 10 +++++----- vignettes/TroubleshootingApiCalls.Rmd | 16 ++++++++-------- vignettes/workflow-read.Rmd | 10 +++++----- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cc067ae5..a934ebf6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,7 +20,7 @@ Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email = comment = c(ORCID = '0000-0002-3386-6076')), person("Felix", "Torres", role = "ctb", email = "fetorres@ucsd.edu"), person("Philip", "Chase", role = "ctb", email = "pbc@ufl.edu")) -URL: https://ouhscbbmc.github.io/REDCapR, https://github.com/OuhscBbmc/REDCapR, https://ouhsc.edu/bbmc/, https://project-redcap.org +URL: https://ouhscbbmc.github.io/REDCapR, https://github.com/OuhscBbmc/REDCapR, https://www.ouhsc.edu/bbmc/, https://project-redcap.org BugReports: https://github.com/OuhscBbmc/REDCapR/issues Depends: R(>= 3.5.0) diff --git a/R/REDCapR-package.R b/R/REDCapR-package.R index 02f91fd5..fe1fc5d4 100644 --- a/R/REDCapR-package.R +++ b/R/REDCapR-package.R @@ -14,7 +14,7 @@ #' following projects. We appreciate the support. #' * *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive #' Maternal, Infant, and Early Childhood Home Visiting -#' ([MIECHV](https://mchb.hrsa.gov/programs/homevisiting/)) Project*. +#' ([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 @@ -25,7 +25,7 @@ #' with [OSDH](https://oklahoma.gov/health.html). #' David Bard, PI, OUHSC; 2015-2017. #' * *Title IV-E Waiver Project*, [HRSA/MCHB](https://mchb.hrsa.gov/)-sponsored -#' collaboration with [OKDHS](https://www.okdhs.org/); +#' 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). diff --git a/README.md b/README.md index 9c1a349c..03da0e23 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The *development* version can be installed from [GitHub](https://github.com/Ouhs install.packages("remotes") # Run this line if the 'remotes' package isn't installed already. remotes::install_github(repo="OuhscBbmc/REDCapR") ``` -The [ouhscbbmc.github.io/REDCapR](https://ouhscbbmc.github.io/REDCapR) site describes the package functions, and includes documents involving [basic operations](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html), [advanced operations](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html), [token security](https://ouhscbbmc.github.io/REDCapR/articles/SecurityDatabase.html), and +The [ouhscbbmc.github.io/REDCapR](https://ouhscbbmc.github.io/REDCapR/ site describes the package functions, and includes documents involving [basic operations](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html), [advanced operations](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html), [token security](https://ouhscbbmc.github.io/REDCapR/articles/SecurityDatabase.html), and [troubleshooting](https://ouhscbbmc.github.io/REDCapR/articles/TroubleshootingApiCalls.html). Also checkout the other packages that exist for communicating with REDCap, which are listed in the [REDCap Tools](https://redcap-tools.github.io/projects/) directory. @@ -60,10 +60,10 @@ We'd like to thank the following developers for their [advice](https://github.co 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/. -* *OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting ([MIECHV](https://mchb.hrsa.gov/programs/homevisiting/)) Project*. HRSA/ACF D89MC23154. David Bard, PI, OUHSC; 2011-2015. +* *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. * *OSDH ParentPRO Pilot Evaluation*, federally-sponsored collaboration with [OSDH](https://oklahoma.gov/health.html). David Bard, PI, OUHSC; 2015-2017. -* *Title IV-E Waiver Project*, [HRSA/MCHB](https://mchb.hrsa.gov/)-sponsored collaboration with [OKDHS](https://www.okdhs.org/); David Bard, PI, OUHSC; 2014-2017. +* *Title IV-E Waiver Project*, [HRSA/MCHB](https://mchb.hrsa.gov/)-sponsored 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). Scott Hofer, PI, University of Victoria; Will Beasley, PI of site-award, OUHSC; 2013-2018. * *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH NIGMS; U54 GM104938](https://grantome.com/grant/NIH/U54-GM104938). Judith A. James, PI, OUHSC; 2013-2018. * *Oklahoma Shared Clinical and Translational Resources*, sponsored by [NIH U54GM104938](https://hsrproject.nlm.nih.gov/view_hsrproj_record/20204379); 2020-2021. @@ -71,9 +71,9 @@ Much of this package has been developed to support the needs of the following pr Thanks, [Will Beasley](https://www.researchgate.net/profile/William-Beasley-5), David Bard, & Thomas Wilson
-[University of Oklahoma Health Sciences Center](https://ouhsc.edu/), +[University of Oklahoma Health Sciences Center](https://www.ouhsc.edu/), [Department of Pediatrics](https://medicine.ouhsc.edu/Academic-Departments/Pediatrics), -[Biomedical & Behavioral Research Core](https://ouhsc.edu/BBMC/). +[Biomedical & Behavioral Research Core](https://www.ouhsc.edu/BBMC/). ### Build Status and Package Characteristics diff --git a/man/REDCapR-package.Rd b/man/REDCapR-package.Rd index 4ac55799..f89d6a7e 100644 --- a/man/REDCapR-package.Rd +++ b/man/REDCapR-package.Rd @@ -15,18 +15,18 @@ following projects. We appreciate the support. \itemize{ \item \emph{OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive Maternal, Infant, and Early Childhood Home Visiting -(\href{https://mchb.hrsa.gov/programs/homevisiting/}{MIECHV}) Project}. -\href{https://grants6.hrsa.gov/MCHB/DGISReports/Abstract/AbstractDetails.aspx?cbAbstractSummary=D89MC23154_2012_NonResearch_4}{HRSA/ACF D89MC23154}. +(\href{https://mchb.hrsa.gov/maternal-child-health-initiatives/home-visiting-overview}{MIECHV}) Project}. +HRSA/ACF D89MC23154. David Bard, PI, OUHSC; 2011-2015. \item \emph{Independent Evaluation of the State of OK MIECHV Evidence Based Home Visitation Project}, \href{https://www.nih.gov/}{NIH}-sponsored collaboration -with \href{https://ok.gov/health/}{OSDH}. +with \href{https://oklahoma.gov/health.html}{OSDH}. David Bard, PI, OUHSC; 2015-2017. \item \emph{OSDH ParentPRO Pilot Evaluation}, federally-sponsored collaboration -with \href{https://ok.gov/health/}{OSDH}. +with \href{https://oklahoma.gov/health.html}{OSDH}. David Bard, PI, OUHSC; 2015-2017. \item \emph{Title IV-E Waiver Project}, \href{https://mchb.hrsa.gov/}{HRSA/MCHB}-sponsored -collaboration with \href{https://www.okdhs.org/}{OKDHS}; +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}. diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index 58e44698..24ee06b3 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -11,7 +11,7 @@ vignette: > # - images/EmailVerified.png --- -There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as ([redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.org/en/latest/) in Python). +There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as ([redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/ in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). Language Agnostic ================================================================== @@ -60,7 +60,7 @@ If all these checks pass, proceed to the next section. If not, start by consult Reading ------------------------------------------------------------------ -This section examines potential problems that occur after data leaves a working server, but before it is handled by their programming language (*e.g.*, Python and R). [Postman](https://www.getpostman.com/) is a Chrome plugin recommended by [several](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/eYK_SLzW2k4/0hmf8vWLpdAJ) [people](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/RdLeRFGqzbg/WgdjTBLph1kJ) that makes troubleshooting much more efficient. +This section examines potential problems that occur after data leaves a working server, but before it is handled by their programming language (*e.g.*, Python and R). [Postman](https://www.postman.com/) is a Chrome plugin recommended by [several](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/eYK_SLzW2k4/0hmf8vWLpdAJ) [people](https://groups.google.com/forum/#!searchin/project-redcap/postman/project-redcap/RdLeRFGqzbg/WgdjTBLph1kJ) that makes troubleshooting much more efficient. ```{r PostmanScreenshot, echo=FALSE, out.extra='style="fig.width=800px"'} knitr::include_graphics("images/PostmanScreenshot.png") @@ -72,7 +72,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") At the bottom of the playground page, the interface attempts to translate your specific API call to different languages, like Python and R. These suggestions are usually correct, but inspect it critically, as you would for any auto-generated script. -1. **Is Postman installed and operating correctly?** If it helps to start with a different REDCap server, you can use this dummy project containing fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/). The url is `https://bbmc.ouhsc.edu/redcap/api/`. There are three key-value pairs: (1) the 'token' is `9A81268476645C4E5F03428B8AC3AA7B`, (2) the 'content' is `record`, and (3) the 'format' should be `CSV`. When checking your own server, the token value should change, but the content and format should not. It should return five records in a CSV format. The 'status' should be `200 OK`. The result should look roughly like this. Notice the line breaks were included in the text values themselves. +1. **Is Postman installed and operating correctly?** If it helps to start with a different REDCap server, you can use this dummy project containing fake data hosted by the [OUHSC BBMC](https://www.ouhsc.edu/bbmc/). The url is `https://bbmc.ouhsc.edu/redcap/api/`. There are three key-value pairs: (1) the 'token' is `9A81268476645C4E5F03428B8AC3AA7B`, (2) the 'content' is `record`, and (3) the 'format' should be `CSV`. When checking your own server, the token value should change, but the content and format should not. It should return five records in a CSV format. The 'status' should be `200 OK`. The result should look roughly like this. Notice the line breaks were included in the text values themselves. ```csv record_id,name_first,name_last,address,telephone,email,dob,age,ethnicity,race,sex,height,weight,bmi,comments,demographics_complete @@ -95,7 +95,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") 1. **Can an administrator query the API successfully with Postman with the admin token?** As an administrator, create an account for yourself, and verify that your token works on your server and project. -1. **Can an administrator query the API successfully with Postman with the user's token?** Use [Postman](https://www.getpostman.com/) as before, but replace your token with the user's token. Once the whole problem is solved, reissue new API tokens to both you and the user. +1. **Can an administrator query the API successfully with Postman with the user's token?** Use [Postman](https://www.postman.com/) as before, but replace your token with the user's token. Once the whole problem is solved, reissue new API tokens to both you and the user. 1. **Can a user query the API successfully with Postman with the their own token?** The values you enter should be exactly the same as those entered in the previous step. A failure here (assuming the previous step was successful) suggests a network or firewall issue. If the server is behind your institution's firewall, verify the you are connecting successfully through the VPN. @@ -105,7 +105,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") curl -X POST -H "Cache-Control: no-cache" -F "token=9A81268476645C4E5F03428B8AC3AA7B" -F "content=record" -F "format=csv" "https://bbmc.ouhsc.edu/redcap/api/" ``` -If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.org/en/latest/) in Python). +If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/ in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). Writing ------------------------------------------------------------------ @@ -275,7 +275,7 @@ If all these checks pass, proceed to the next section. If not, start by consult Reading with the REDCapR Package ------------------------------------------------------------------ -[REDCapR](https://ouhscbbmc.github.io/REDCapR/) wraps convenience functions around [httr](https://httr.r-lib.org/) to reduce the size and complexity of the user's code. The package's basic functions are [demonstrated in a vignette](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) and are documented in its [reference manual](https://ouhscbbmc.github.io/REDCapR/reference). +[REDCapR](https://ouhscbbmc.github.io/REDCapR/) wraps convenience functions around [httr](https://httr.r-lib.org/) to reduce the size and complexity of the user's code. The package's basic functions are [demonstrated in a vignette](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) and are documented in its [reference manual](https://ouhscbbmc.github.io/REDCapR/reference/. If you're not using REDCapR, you can skip this section and proceed to "Exporting from REDCap to R, using redcapAPI" or "Importing into REDCap from R" below. @@ -306,7 +306,7 @@ If you're not using REDCapR, you can skip this section and proceed to "Exporting If this fails, see "Problems in the project's metadata/dictionary" under [Common Gotchas](#gotchas-agnostic) above. A problematic data dictionary may produce the error `Error in inherits(ds, "data.frame") : object 'ds' not found` when calling `REDCapR::redcap_metadata_read()`. -1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/) as in the previous section. +1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://www.ouhsc.edu/bbmc/) as in the previous section. ```r library(REDCapR) # Load the package into the current R session. @@ -423,7 +423,7 @@ If you're not using redcapAPI, you can skip this section and proceed to 'Importi If this fails, see "Problems in the project's metadata/dictionary." under [Gotchas](#gotchas-agnostic) above -1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://ouhsc.edu/bbmc/) as in the previous section. +1. **Can you export from an example project?** This is the same fake data hosted by the [OUHSC BBMC](https://www.ouhsc.edu/bbmc/) as in the previous section. ```r library(redcapAPI) # Load the package into the current R session. diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 3979baf9..6ca00ab5 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, & Thomas Wilson, [Biomedical & Behavior Methodology Core](https://ouhsc.edu/bbmc/team/), OUHSC Pediatrics +author: Will Beasley, Geneva Marshall, & Thomas Wilson, [Biomedical & Behavior Methodology Core](https://www.ouhsc.edu/bbmc/team/), OUHSC Pediatrics output: rmarkdown::html_vignette: md_extensions: -autolink_bare_uris @@ -25,7 +25,7 @@ Part 1 - Pre-requisites Verify REDCapR is installed ------------------------- -First confirm that the REDCapR package is installed on your local machine. If not, the following line will throw the error `Loading required namespace: REDCapR. Failed with error: ‘there is no package called ‘REDCapR’’`. If this call fails, follow the installation instructions on the [REDCapR](https://ouhscbbmc.github.io/REDCapR) webpage. +First confirm that the REDCapR package is installed on your local machine. If not, the following line will throw the error `Loading required namespace: REDCapR. Failed with error: ‘there is no package called ‘REDCapR’’`. If this call fails, follow the installation instructions on the [REDCapR](https://ouhscbbmc.github.io/REDCapR/ webpage. ```{r pre-req} requireNamespace("REDCapR") @@ -78,7 +78,7 @@ Security Method 1: Token File The basic goals are (a) separate the secret values from the R file into a dedicated file and (b) secure the dedicated file. If using a git repository, prevent the file from being committed with an entry in [`.gitignore`](https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files). Ask your institution's IT security team for their recommendation. -The [`retrieve_credential_local()`](https://ouhscbbmc.github.io/REDCapR/reference/retrieve_credential.html) function in the [REDCapR](https://ouhscbbmc.github.io/REDCapR) package loads relevant information from a csv into R. The plain-text file might look like this: +The [`retrieve_credential_local()`](https://ouhscbbmc.github.io/REDCapR/reference/retrieve_credential.html) function in the [REDCapR](https://ouhscbbmc.github.io/REDCapR/ package loads relevant information from a csv into R. The plain-text file might look like this: ```csv redcap_uri,username,project_id,token,comment @@ -262,7 +262,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](https://ouhscbbmc.github.io/REDCapR/articles/TroubleshootingApiCalls.html). +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 ------------------------- @@ -291,4 +291,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)](https://osctr.ouhsc.edu). +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). From 286845e39c578a69cc32de236374be1e00b2ef93 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 15:15:46 -0500 Subject: [PATCH 07/14] correcting more links some I just made ref #345 --- DESCRIPTION | 2 +- inst/test-data/project-longitudinal/expected/default.R | 2 +- .../project-longitudinal/expected/filter-character.R | 2 +- .../project-longitudinal/expected/filter-numeric.R | 2 +- .../test-data/project-longitudinal/longitudinal-data.csv | 2 +- tests/testthat/test-read-errors.R | 8 ++++---- utility/refresh.R | 9 ++++++++- vignettes/BasicREDCapROperations.Rmd | 2 +- vignettes/workflow-read.Rmd | 3 +-- 9 files changed, 19 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a934ebf6..42170e90 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,7 +20,7 @@ Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email = comment = c(ORCID = '0000-0002-3386-6076')), person("Felix", "Torres", role = "ctb", email = "fetorres@ucsd.edu"), person("Philip", "Chase", role = "ctb", email = "pbc@ufl.edu")) -URL: https://ouhscbbmc.github.io/REDCapR, https://github.com/OuhscBbmc/REDCapR, https://www.ouhsc.edu/bbmc/, https://project-redcap.org +URL: https://ouhscbbmc.github.io/REDCapR/, https://github.com/OuhscBbmc/REDCapR, https://www.ouhsc.edu/bbmc/, https://project-redcap.org BugReports: https://github.com/OuhscBbmc/REDCapR/issues Depends: R(>= 3.5.0) diff --git a/inst/test-data/project-longitudinal/expected/default.R b/inst/test-data/project-longitudinal/expected/default.R index d04494ec..b9beb48d 100644 --- a/inst/test-data/project-longitudinal/expected/default.R +++ b/inst/test-data/project-longitudinal/expected/default.R @@ -66,7 +66,7 @@ NA, NA, NA, NA), first_name = c("Zharko", NA, NA, NA, NA, NA, NA, NA, NA), weight = c(80, NA, NA, NA, NA, NA, 66, NA, NA, NA, NA, NA, 88, NA, NA, NA, NA, NA), bmi = c(31.3, NA, NA, NA, NA, NA, 27.1, NA, NA, NA, NA, NA, 22.2, NA, NA, NA, NA, - NA), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", + NA), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", NA, NA, NA, NA, NA, "Dissuade ecstatic and properly saw entirely sir why laughter endeavor. In on my jointure horrible margaret suitable he followed speedily. Indeed vanity excuse or mr lovers of on. By offer scale an stuff. Blush be sorry no sight. Sang lose of hour then he left find. \n\nDenote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize.", NA, NA, NA, NA, NA, "It real sent your at. Amounted all shy set why followed declared. Repeated of endeavor mr position kindness offering ignorant so up. Simplicity are melancholy preference considered saw companions. Disposal on outweigh do speedily in on. Him ham although thoughts entirely drawings. Acceptance unreserved old admiration projection nay yet him. Lasted am so before on esteem vanity oh.", NA, NA, NA, NA, NA), demographics_complete = c(2, NA, NA, diff --git a/inst/test-data/project-longitudinal/expected/filter-character.R b/inst/test-data/project-longitudinal/expected/filter-character.R index 5d884f56..954fa8b6 100644 --- a/inst/test-data/project-longitudinal/expected/filter-character.R +++ b/inst/test-data/project-longitudinal/expected/filter-character.R @@ -10,7 +10,7 @@ structure(list(study_id = 100, redcap_event_name = "enrollment_arm_1", drink___1 = 0, drink___2 = 0, drink___3 = 0, drink___4 = 1, specify_mood = 71, meds___1 = 0, meds___2 = 1, meds___3 = 0, meds___4 = 0, meds___5 = 0, height = 160, weight = 80, bmi = 31.3, - comments = "Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", + comments = "Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", demographics_complete = 2, ec_phone = NA, ec_confirmed = NA, next_of_kin_contact_name = NA, next_of_kin_contact_address = NA, next_of_kin_contact_phone = NA, next_of_kin_confirmed = NA, diff --git a/inst/test-data/project-longitudinal/expected/filter-numeric.R b/inst/test-data/project-longitudinal/expected/filter-numeric.R index 823d5851..7fd6cd06 100644 --- a/inst/test-data/project-longitudinal/expected/filter-numeric.R +++ b/inst/test-data/project-longitudinal/expected/filter-numeric.R @@ -15,7 +15,7 @@ structure(list(study_id = c(100, 220), redcap_event_name = c("enrollment_arm_1", 1), specify_mood = c(71, 29), meds___1 = c(0, 1), meds___2 = c(1, 1), meds___3 = c(0, 0), meds___4 = c(0, 0), meds___5 = c(0, 0), height = c(160, 156), weight = c(80, 66), bmi = c(31.3, - 27.1), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttps://randomtextgenerator.com/", + 27.1), comments = c("Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. \n\nOn recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. \n\nConcerns greatest \n\nhttp://randomtextgenerator.com/", "Dissuade ecstatic and properly saw entirely sir why laughter endeavor. In on my jointure horrible margaret suitable he followed speedily. Indeed vanity excuse or mr lovers of on. By offer scale an stuff. Blush be sorry no sight. Sang lose of hour then he left find. \n\nDenote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize." ), demographics_complete = c(2, 2), ec_phone = c(NA, NA), ec_confirmed = c(NA, NA), next_of_kin_contact_name = c(NA, diff --git a/inst/test-data/project-longitudinal/longitudinal-data.csv b/inst/test-data/project-longitudinal/longitudinal-data.csv index c854de37..2e1cd7c7 100644 --- a/inst/test-data/project-longitudinal/longitudinal-data.csv +++ b/inst/test-data/project-longitudinal/longitudinal-data.csv @@ -1,5 +1,5 @@ study_id,redcap_event_name,date_enrolled,patient_document,first_name,last_name,telephone_1,email,dob,age,ethnicity,race,sex,given_birth,num_children,gym___0,gym___1,gym___2,gym___3,gym___4,aerobics___0,aerobics___1,aerobics___2,aerobics___3,aerobics___4,eat___0,eat___1,eat___2,eat___3,eat___4,drink___0,drink___1,drink___2,drink___3,drink___4,specify_mood,meds___1,meds___2,meds___3,meds___4,meds___5,height,weight,bmi,comments,demographics_complete,dialysis_unit_name,dialysis_unit_phone,dialysis_schedule_days,dialysis_schedule_time,etiology_esrd,subject_comments,contact_info_complete,height2,weight2,bmi2,prealb_b,creat_b,npcr_b,chol_b,transferrin_b,baseline_data_complete,vld1,vld2,vld3,vld4,vld5,visit_lab_data_complete,pmq1,pmq2,pmq3,pmq4,patient_morale_questionnaire_complete,vbw1,vbw2,vbw3,vbw4,vbw5,vbw6,vbw7,vbw8,vbw9,visit_blood_workup_complete,vob1,vob2,vob3,vob4,vob5,vob6,vob7,vob8,vob9,vob10,vob11,vob12,vob13,vob14,visit_observed_behavior_complete,study_comments,complete_study,withdraw_date,date_visit_4,alb_4,prealb_4,creat_4,discharge_date_4,discharge_summary_4,npcr_4,chol_4,withdraw_reason,completion_data_complete,cpq1,cpq2,cpq3,cpq4,cpq5,cpq6,cpq7,cpq8,cpq9,cpq10,cpq11,cpq12,cpq13,completion_project_questionnaire_complete -100,enrollment_arm_1,2015-04-02,,Zharko,Lenox,"(415) 555-1212",zlehnox@gmail.com,1983-09-23,31,0,4,1,,,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,71,0,1,0,0,0,160,80,31.3,"Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. On recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. Concerns greatest https://randomtextgenerator.com/",2,"(433) 345-9282",0,"Ricki Reşit","1206 Route 20 Chelmsford, MA 01824","(324) 438-8221",1,2,200,234,58.5,43,355,23,3.5,3.66,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +100,enrollment_arm_1,2015-04-02,,Zharko,Lenox,"(415) 555-1212",zlehnox@gmail.com,1983-09-23,31,0,4,1,,,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,71,0,1,0,0,0,160,80,31.3,"Is he staying arrival address earnest. To preference considered it themselves inquietude collecting estimating. View park for why gay knew face. Next than near to four so hand. Times so do he downs me would. Witty abode party her found quiet law. They door four bed fail now have. On recommend tolerably my belonging or am. Mutual has cannot beauty indeed now sussex merely you. It possible no husbands jennings ye offended packages pleasant he. Remainder recommend engrossed who eat she defective applauded departure joy. Get dissimilar not introduced day her apartments. Fully as taste he mr do smile abode every. Luckily offered article led lasting country minutes nor old. Happen people things oh is oppose up parish effect. Law handsome old outweigh humoured far appetite. Concerns greatest http://randomtextgenerator.com/",2,"(433) 345-9282",0,"Ricki Reşit","1206 Route 20 Chelmsford, MA 01824","(324) 438-8221",1,2,200,234,58.5,43,355,23,3.5,3.66,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,dose_1_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,2,1,1,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,visit_1_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5.6,3.5,66.7,33.5,.34,2,1,0,0,0,0,.4334,23.3,23.3,.988,.342,"0. AM",2,0,1,1,0,0,1,0,1,0,"him absolute entrance nay. Door neat week do find past he. Be no surprise he honoured indulged. Unpacked endeavor six steepest had husbands her. Painted no or affixed it so civilly. Exposed neither pressed so cottage as proceed at offices. Nay they gone sir game four. Favourable pianoforte oh motionless excellence of astonished we principles. Warrant present garrets limited cordial in inquiry to. Supported me sweetness behaviour shameless excellent so arranging. The him father parish looked has sooner.",0,0,1,0,1,0,"The him father parish looked has sooner. Attachment frequently gay terminated son. You greater nay use prudent placing. Passage to so distant behaved natural between do talking. Friends off her windows painful. Still gay event you being think nay for. In three if aware he point it. Effects warrant me by no on feeling settled resolve. ",0,,,,,,,,,,,,,,,,,,,,,,,,,,, 100,dose_2_arm_1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,1,0,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/testthat/test-read-errors.R b/tests/testthat/test-read-errors.R index 74e57529..a84e78fa 100644 --- a/tests/testthat/test-read-errors.R +++ b/tests/testthat/test-read-errors.R @@ -3,13 +3,13 @@ library(testthat) credential <- retrieve_credential_testing() test_that("One Shot: Bad Uri -Not HTTPS", { - expected_message_411 <- "\nLength Required\n\n

Length Required

\n

HTTP Error 411. The request must be chunked or have a content length.

\n\n" + expected_message_411 <- "\nLength Required\n\n

Length Required

\n

HTTP Error 411. The request must be chunked or have a content length.

\n\n" expected_message_501 <- "The requested method is not implemented." expect_message( returned_object <- redcap_read_oneshot( - redcap_uri = "https://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) @@ -24,7 +24,7 @@ test_that("One Shot: Bad Uri -Not HTTPS", { }) test_that("One Shot: Bad Uri -wrong address", { - expected_message <- "\n\n\n\n404 - File or directory not found.\n\n\n\n

Server Error

\n
\n
\n

404 - File or directory not found.

\n

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

\n
\n
\n\n\n" + expected_message <- "\n\n\n\n404 - File or directory not found.\n\n\n\n

Server Error

\n
\n
\n

404 - File or directory not found.

\n

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

\n
\n
\n\n\n" expect_message( returned_object <- @@ -48,7 +48,7 @@ test_that("Batch: Bad Uri -Not HTTPS", { expect_message( returned_object <- redcap_read( - redcap_uri = "https://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) diff --git a/utility/refresh.R b/utility/refresh.R index 320cecef..f28f0401 100644 --- a/utility/refresh.R +++ b/utility/refresh.R @@ -27,15 +27,22 @@ pkgdown::build_site() devtools::run_examples(); #dev.off() #This overwrites the NAMESPACE file too # devtools::run_examples(, "redcap_read.Rd") test_results_checked <- devtools::test() -test_results_checked <- devtools::test(filter = "create-credential-local") +test_results_checked <- devtools::test(filter = "read-errors") test_results_checked <- devtools::test(filter = "report") test_results_checked <- devtools::test(filter = "validate.*$") # testthat::test_dir("./tests/") test_results_not_checked <- testthat::test_dir("./tests/manual/") +urlchecker::url_check(); urlchecker::url_update() + # devtools::check(force_suggests = FALSE) devtools::check(cran=TRUE) +devtools::check( # Equivalent of R-hub + manual = TRUE, + remote = TRUE, + incoming = TRUE +) devtools::check_rhub(email="wibeasley@hotmail.com") # devtools::check_win_devel() # CRAN submission policies encourage the development version # revdepcheck::revdep_check(num_workers = 4) diff --git a/vignettes/BasicREDCapROperations.Rmd b/vignettes/BasicREDCapROperations.Rmd index b0ab1c1a..efddbd78 100644 --- a/vignettes/BasicREDCapROperations.Rmd +++ b/vignettes/BasicREDCapROperations.Rmd @@ -9,7 +9,7 @@ vignette: > %\VignetteEncoding{UTF-8} --- -This vignette covers the the basic functions exposed by the [`httr`](https://github.com/hadley/httr) and [`curl`](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](https://www.project-redcap.org/) through its API. +This vignette covers the the basic functions exposed by the [`httr`](https://github.com/r-lib/httr) and [`curl`](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](https://www.project-redcap.org/) through its API. Reading REDCap Data ================================================================== diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 6ca00ab5..d12a4a3b 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -2,8 +2,7 @@ title: "Typical REDCap Workflow for a Data Analyst" author: Will Beasley, Geneva Marshall, & Thomas Wilson, [Biomedical & Behavior Methodology Core](https://www.ouhsc.edu/bbmc/team/), OUHSC Pediatrics output: - rmarkdown::html_vignette: - md_extensions: -autolink_bare_uris + rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Typical REDCap Workflow for a Data Analyst} %\VignetteEngine{knitr::rmarkdown} From 120f97498401ef1d98345114aa941595ae5c8a5e Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 15:49:42 -0500 Subject: [PATCH 08/14] fix last of the URLs hopefully ref #345 --- README.md | 2 +- inst/misc/bad.credentials | 2 +- vignettes/TroubleshootingApiCalls.Rmd | 4 ++-- vignettes/workflow-read.Rmd | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 03da0e23..36cf8ce1 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Thanks, | Key | Value | | :--- | :----- | -| [License](https://choosealicense.com/) | [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) | +| [License](https://choosealicense.com/) | [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://choosealicense.com/licenses/mit/) | | [CRAN Version](https://cran.r-project.org/package=REDCapR) | [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/REDCapR)](https://cran.r-project.org/package=REDCapR) | | [CRAN Rate](https://cranlogs.r-pkg.org/) | ![CRAN Pace](https://cranlogs.r-pkg.org/badges/REDCapR) | | [Zenodo Archive](https://zenodo.org/search?ln=en&p=redcapr) | [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.61990.svg)](https://doi.org/10.5281/zenodo.61990) | diff --git a/inst/misc/bad.credentials b/inst/misc/bad.credentials index 71bd0581..418e24bb 100644 --- a/inst/misc/bad.credentials +++ b/inst/misc/bad.credentials @@ -4,5 +4,5 @@ # are stored securely. # redcap_uri,username,project_id,token,comment -"https://bbmc.ouhsc.edu/redcap/api/","myusername","153","9A81268476645C4E5F03428B8A","simple static (read-only) test project" +"http://bbmc.ouhsc.edu/redcap/api/","myusername","153","9A81268476645C4E5F03428B8A","simple static (read-only) test project" "https://bbmc.ouhsc.edu/redcap/api/","myusername","212","D70F9ACD1EDD6F151C6EA78683944E98","simple write data" diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index 24ee06b3..6bb1fb20 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -11,7 +11,7 @@ vignette: > # - images/EmailVerified.png --- -There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as ([redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/ in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). +There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). Language Agnostic ================================================================== @@ -105,7 +105,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") curl -X POST -H "Cache-Control: no-cache" -F "token=9A81268476645C4E5F03428B8AC3AA7B" -F "content=record" -F "format=csv" "https://bbmc.ouhsc.edu/redcap/api/" ``` -If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/ in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). +If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). Writing ------------------------------------------------------------------ diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index d12a4a3b..5cb39b8f 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -42,7 +42,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://bbmc.ouhsc.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: @@ -283,7 +283,7 @@ By default, `REDCapR::redcap_read()` requests datasets of 100 patients as a time Writing to the Server ------------------------- -Reading record data is only one API capability. REDCapR [exposes 20+ API functions]([`REDCapR::redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html)), such as reading metadata, retrieving survey links, and writing records back to REDCap. This last operation is relevant in [Kenneth McLean](https://twitter.com/kennethmclean92)'s presentation following a five-minute break. +Reading record data is only one API capability. REDCapR [exposes 20+ API functions](https://ouhscbbmc.github.io/REDCapR/reference/), such as reading metadata, retrieving survey links, and writing records back to REDCap. This last operation is relevant in [Kenneth McLean](https://twitter.com/kennethmclean92)'s presentation following a five-minute break. Notes =================================== From 52de5d7fd4487290e592246a46c899dd9d424d76 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 16:18:30 -0500 Subject: [PATCH 09/14] more URLs --- documentation-for-developers/online-material.md | 2 +- vignettes/TroubleshootingApiCalls.Rmd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation-for-developers/online-material.md b/documentation-for-developers/online-material.md index 7e74c974..7ef47f1d 100644 --- a/documentation-for-developers/online-material.md +++ b/documentation-for-developers/online-material.md @@ -2,7 +2,7 @@ List of Online Material ============================================== This is a running list of material we've seen online describing how to connect to REDCap with R (not necessarily with the API). If you've read or written something you'd like included, please tell us, or just edit the markdown file yourself. -* [Intro to the REDCap API](https://sburns.org/2013/07/22/intro-to-redcap-api.html): A tutorial by Scott S Burns, 2013-07-22 +* [Intro to the REDCap API](http://sburns.org/2013/07/22/intro-to-redcap-api.html): A tutorial by Scott S Burns, 2013-07-22 * [Improving Research through Advanced REDCap Interfaces](https://github.com/sburns/advanced-redcap-interfaces/blob/master/slides.md). By Scott S Burns, 2013-04-18 * [REDCap and DDI Exporting Data and Metadata with the API](https://hdl.handle.net/1808/11047) By Larry Hoyle & Ada Van Roekel, 2013-04-03 * [REDCapCustomReports](https://github.com/jeffreyhorner/REDCapCustomReports): REDCapCustomReports is a REDCap module for creating custom PDF reports written in the R language. By Jeffrey Horner, started 2013-02-15. diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index 6bb1fb20..3971ed61 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -503,9 +503,9 @@ Resources ``` * If you have access to the REDCap wiki, some newer examples might exist at . The official documentation can be found on the `API Help Page` and `API Examples' pages on the REDCap wiki (*i.e.*, and ). If you do not have an account for the wiki, please ask your campus REDCap administrator to send you the static material. -* Scott Burns, the primary developer of [PyCap](https://github.com/redcap-tools/PyCap) has a good intro at https://sburns.org/2013/07/22/intro-to-redcap-api.html +* Scott Burns, the primary developer of [PyCap](https://github.com/redcap-tools/PyCap) has a good intro at http://sburns.org/2013/07/22/intro-to-redcap-api.html * Benjamin Nutter, the primary developer of [redcapAPI](https://github.com/nutterb/redcapAPI/wiki) has a good wiki at https://github.com/nutterb/redcapAPI/wiki -* In addition to this troubleshooting document, REDCapR has vignettes that covers its [basic](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) and [advanced](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html) operations. +* In addition to this troubleshooting document, REDCapR has vignettes that covers its [basic](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) and [advanced](https://ouhscbbmc.github.io/REDCapR/articles/advanced-redcapr-operations.html) operations. Document Info ------------------------------------------------------------------ From df2f7e419754fe194bb2cec4b94bbc1ac8e81f57 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 16:38:51 -0500 Subject: [PATCH 10/14] Update cran-comments.md ref #345 --- cran-comments.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index efb67a6e..aaba92a0 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -12,19 +12,21 @@ Test environments 1. Local Ubuntu, R 4.1.0 patched 1. Local Win8, R 4.1.0 patched -1. r-hub - 1. [Ubuntu Linux 16.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-71151f2f04454bc18c16430e5d62610b) - 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-2f619028b765442f9dc1c34373443d2a) +1. R-hub + 1. [Ubuntu Linux 20.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-07f6c48b71b24a0c8764a11732d1075e) + 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-26dba71e01de40f6b99e85abf366bea4) 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-80133501925a411da4c3cf3be8205e29) -1. [win-builder](https://win-builder.r-project.org/xYyWrC1uFjXH), development version. +1. [win-builder](https://win-builder.r-project.org/BwNz2bnHxuse), 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 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;" -* Two notes are returned for Health Dept sites, but they work in a browser. +* 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. Downstream dependencies ----------------------------------------------- From 9b18e230f7b8d86c2447b51904744056d9f58477 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 18:33:50 -0500 Subject: [PATCH 11/14] include session info steal some Actions code from https://github.com/tidyverse/readr/blob/master/.github/workflows/R-CMD-check.yaml --- .github/workflows/check-release.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-release.yaml b/.github/workflows/check-release.yaml index c6e6bd6b..6fee585b 100644 --- a/.github/workflows/check-release.yaml +++ b/.github/workflows/check-release.yaml @@ -19,6 +19,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v1 - uses: r-lib/actions/setup-pandoc@master @@ -53,11 +54,22 @@ jobs: remotes::install_deps(dependencies = TRUE) remotes::install_cran("covr") shell: Rscript {0} + + - name: Session info + run: | + options(width = 100) + pkgs <- installed.packages()[, "Package"] + sessioninfo::session_info(pkgs, include_base = TRUE) + shell: Rscript {0} + - name: Check + env: + _R_CHECK_CRAN_INCOMING_: false run: | options(crayon.enabled = TRUE) - rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") shell: Rscript {0} + - name: Test coverage run: covr::codecov() shell: Rscript {0} From 7e8edb3cc4ef19b0652df3c4ddd59629483ba76d Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 18:34:05 -0500 Subject: [PATCH 12/14] Update cran-comments.md ref #345 --- cran-comments.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index aaba92a0..40b85826 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -13,9 +13,9 @@ Test environments 1. Local Ubuntu, R 4.1.0 patched 1. Local Win8, R 4.1.0 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-07f6c48b71b24a0c8764a11732d1075e) - 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_1.0.0.tar.gz-26dba71e01de40f6b99e85abf366bea4) - 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-80133501925a411da4c3cf3be8205e29) + 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. [GiHub Actions](https://github.com/OuhscBbmc/REDCapR/actions), Ubuntu 20.04 LTS From cb3dff0653ba1e9bf103d0652b28b9cd64d23bf7 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 19:01:50 -0500 Subject: [PATCH 13/14] canonical url to an external vignette ref #345 --- vignettes/BasicREDCapROperations.Rmd | 2 +- vignettes/advanced-redcapr-operations.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/BasicREDCapROperations.Rmd b/vignettes/BasicREDCapROperations.Rmd index efddbd78..aad1fc70 100644 --- a/vignettes/BasicREDCapROperations.Rmd +++ b/vignettes/BasicREDCapROperations.Rmd @@ -28,7 +28,7 @@ opts_chunk$set( ) knit_print.data.frame = function(x, ...) { - # Adapted from https://cran.r-project.org/web/packages/knitr/vignettes/knit_print.html + # See https://cran.r-project.org/package=knitr/vignettes/knit_print.html # res = paste(c("", "", kable(x)), collapse = "\n") # asis_output(res) x %>% diff --git a/vignettes/advanced-redcapr-operations.Rmd b/vignettes/advanced-redcapr-operations.Rmd index 6de46a2f..fe74d699 100644 --- a/vignettes/advanced-redcapr-operations.Rmd +++ b/vignettes/advanced-redcapr-operations.Rmd @@ -27,7 +27,7 @@ opts_chunk$set( # knitr::opts_chunk$set(comment = "#>", collapse = TRUE) knit_print.data.frame = function(x, ...) { - # Adapted from https://cran.r-project.org/web/packages/knitr/vignettes/knit_print.html + # See https://cran.r-project.org/package=knitr/vignettes/knit_print.html x %>% # rmarkdown::print.paged_df() %>% From 244a46db59384410b3283a0d6286b1d1ab641e03 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Wed, 21 Jul 2021 19:03:39 -0500 Subject: [PATCH 14/14] Update cran-comments.md ref #345 --- cran-comments.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 40b85826..bdf3fc30 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,9 @@ Description =============================================== -This submission includes new features and also addresses recent breaking tests from readr 2.0 (). +This submission includes new features and also addresses a few minor tests breaking from yesterday's readr 2.0 release (). -The [single existing CRAN daily note](https://cran.rstudio.com/web/checks/check_results_REDCapR.html) has been addressed (ie, 'LazyData' is specified without a 'data' directory). +There is a [single existing CRAN daily note](https://cran.rstudio.com/web/checks/check_results_REDCapR.html); it has been addressed (ie, 'LazyData' is specified without a 'data' directory). Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley @@ -12,6 +12,7 @@ Test environments 1. Local Ubuntu, R 4.1.0 patched 1. Local Win8, R 4.1.0 patched +1. Local Win10, R 4.1.0 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) @@ -23,7 +24,7 @@ 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 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. + * 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.