Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update urls #464

Merged
merged 5 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Encapsulates functions to streamline calls from R to the REDCap
University. The Application Programming Interface (API) offers an avenue
to access and modify data programmatically, improving the capacity for
literate and reproducible programming.
Version: 1.1.9003
Version: 1.1.9004
Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email =
"[email protected]", comment = c(ORCID = "0000-0002-5613-5006")),
person("David", "Bard", role = "ctb", comment = c(ORCID = "0000-0002-3922-8489")),
Expand Down
5 changes: 3 additions & 2 deletions R/sanitize-token.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
#' with 40 characters (as opposed to a hexadecimal/base16 value
#' with 32 characters):
#' `^([A-Za-z\\d+/\\+=]{40})$`.
#' See <https://regexland.com/base64/> for alternative approaches to validate
#' base64 values.
#' See <https://rgxdb.com/r/1NUN74O6> or
#' <https://regex101.com/library/lXFWqM>
#' for alternative approaches to validate base64 values.
#'
#' If no pattern is specified, the default is a 32-character hex token:
#' `^([0-9A-Fa-f]{32})(?:\\n)?$`. The important segment is contained in the
Expand Down
5 changes: 3 additions & 2 deletions man/sanitize_token.Rd

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

12 changes: 6 additions & 6 deletions vignettes/longitudinal-and-repeating.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ registerS3method("knit_print", "data.frame", knit_print.data.frame)
Background
==================================================================

This vignette pertains to reading REDCap records from a project that (a) has longitudinal events or (b) has a repeating measure. The first section conceptually discusses how REDCap stores complex structures. The remaining sections describe how to best retrieve complex structures with the [REDCapTidyieR](https://chop-cgtdataops.github.io/REDCapTidieR/) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) packages.
This vignette pertains to reading REDCap records from a project that (a) has longitudinal events or (b) has a repeating measure. The first section conceptually discusses how REDCap stores complex structures. The remaining sections describe how to best retrieve complex structures with the [REDCapTidyieR](https://chop-cgtinformatics.github.io/REDCapTidieR/) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) packages.

* If you are new to R or REDCap, consider start with the [Typical REDCap Workflow for a Data Analyst](https://ouhscbbmc.github.io/REDCapR/articles/workflow-read.html) and [Basic REDCapR Operations](https://ouhscbbmc.github.io/REDCapR/articles/BasicREDCapROperations.html) vignettes and then return to this document.
* If you are reading from a *simple* project, just call REDCapR's [`redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html).
Expand Down Expand Up @@ -203,7 +203,7 @@ Our advice is to start before Table 5 is assembled --retrieve the information in
Two approaches are appropriate for most scenarios:

1. multiple calls to REDCapR's [`redcap_read()`](https://ouhscbbmc.github.io/REDCapR/reference/redcap_read.html), or
1. a single call to REDCapTidieR's [`redcap_read_tidy()`](https://chop-cgtdataops.github.io/REDCapTidieR/reference/read_redcap_tidy.html).
1. a single call to REDCapTidieR's [`redcap_read_tidy()`](https://chop-cgtinformatics.github.io/REDCapTidieR/reference/read_redcap_tidy.html).

The code in the vignette requires the magrittr package for the `%>%` (alternatively you can use `|>` if you're using R 4.0.2 or later).

Expand Down Expand Up @@ -319,18 +319,18 @@ ds_block
One REDCapTidieR Call for All Tables
------------------------------------------------------------------

[REDCapTidieR](https://chop-cgtdataops.github.io/REDCapTidieR/)'s initial motivation is to facilitate longitudinal analyses and promote [tidy](https://r4ds.hadley.nz/data-tidy.html) data hygiene.
[REDCapTidieR](https://chop-cgtinformatics.github.io/REDCapTidieR/)'s initial motivation is to facilitate longitudinal analyses and promote [tidy](https://r4ds.hadley.nz/data-tidy.html) data hygiene.

{Stephan Kadauke & Richard Hanna, please represent your package as you wish. Tell me if I've positioned it differently than you would have.}

Choosing between the Approaches
------------------------------------------------------------------

When retrieving data from REDCap, we recommend calling [REDCapTidieR](https://chop-cgtdataops.github.io/REDCapTidieR/) in many scenarios, such as:
When retrieving data from REDCap, we recommend calling [REDCapTidieR](https://chop-cgtinformatics.github.io/REDCapTidieR/) in many scenarios, such as:

* you are new to managing or analyzing data with R, or
* your analyses will require most of the dataset's rows or columns, or
* you'd benefit from some of the auxiliary information in [REDCapTidieR's supertibble](https://chop-cgtdataops.github.io/REDCapTidieR/articles/REDCapTidieR.html#tidying-redcap-exports), such as the instrument's structure. <!--Future version may provide more information, like the column and row count of each table.-->
* you'd benefit from some of the auxiliary information in [REDCapTidieR's supertibble](https://chop-cgtinformatics.github.io/REDCapTidieR/articles/REDCapTidieR.html#tidying-redcap-exports), such as the instrument's structure. <!--Future version may provide more information, like the column and row count of each table.-->

However we recommend calling [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in other scenarios. It could be worth calling REDCapR multiple times if:

Expand All @@ -341,7 +341,7 @@ However we recommend calling [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in

If in doubt, start with REDCapTidieR. Escalate to REDCapR if your download time is too long and might be decreased by reducing the information retrieved from the server and transported across the network.

And of course many scenarios are solved best with a combination of both packages, such as (a) [REDCapR](https://ouhscbbmc.github.io/REDCapR/) populates the initial demographics in REDCap, (b) research staff enter measures collected from patients over time, (c) [REDCapTidieR](https://chop-cgtdataops.github.io/REDCapTidieR/) retrieves the complete longitudinal dataset, (d) [dplyr](https://dplyr.tidyverse.org/) joins the tibbles, and finally (e) [lme4](https://cran.r-project.org/package=lme4/vignettes/lmer.pdf) tests hypotheses involving [patient trajectories](https://datascienceplus.com/analysing-longitudinal-data-multilevel-growth-models-i/) over time.
And of course many scenarios are solved best with a combination of both packages, such as (a) [REDCapR](https://ouhscbbmc.github.io/REDCapR/) populates the initial demographics in REDCap, (b) research staff enter measures collected from patients over time, (c) [REDCapTidieR](https://chop-cgtinformatics.github.io/REDCapTidieR/) retrieves the complete longitudinal dataset, (d) [dplyr](https://dplyr.tidyverse.org/) joins the tibbles, and finally (e) [lme4](https://cran.r-project.org/package=lme4/vignettes/lmer.pdf) tests hypotheses involving [patient trajectories](https://datascienceplus.com/analysing-longitudinal-data-multilevel-growth-models-i/) over time.

Escalating to REDCapR
------------------------------------------------------------------
Expand Down