Closed rsh52 closed 6 months ago
I think this is ready for review now, if I can get @ezraporter to review code (and the rest π ) and @skadauke to review the vignette / glossary updates and the error message:
(note that the "Mixed Structure Instruments" hyperlink doesn't work yet until we've published this)
I like the glossary, vignette, and error message updates! π
Run our timing benchmarks to make sure the latest change didn't mess things up. (Can we also add identifiers to the microbenchmark_results.csv so it's easy to line things up when we add new redcaps?)
Updated run results and added column outputs for the database description and source (ouhsc / redcaptidier).
Run our timing benchmarks to make sure the latest change didn't mess things up. (Can we also add identifiers to the microbenchmark_results.csv so it's easy to line things up when we add new redcaps?)
Updated run results and added column outputs for the database description and source (ouhsc / redcaptidier).
Thanks!
Description
This PR seeks to add a new parameter to
read_redcap()
which will allow users to override the check in place that stops data exports for REDCap projects where instruments are detected to be both repeating and nonrepeating. The background rationale for not allowing this was to keep to tidy data principles.For the purposes of this PR and documentation, here are my definitions for some things:
structure
, and has only ever been "nonrepeating" / "repeating" for values. I wanted to keep this terminology so some of the updated functions use "structure" / "mixed structure"Proposed Changes
List changes below in bullet format:
enable_repeat_nonrepeat
toread_readcap()
and lower-level functionclean_redcap_long()
check_repeat_and_nonrepeat()
to new functionget_mixed_structure_fields()
get_mixed_structure_fields()
in handler function for converting nonrepeat parts of mixed structure instruments to repeating ones with a single instance viaconvert_mixed_instrument()
test_creds.R
(We now have a new database where a new env variable is needed:REDCAPTIDIER_MIXED_STRUCTURE_API
)structure
column in supertibble to say "mixed" for mixed structure instrumentsRemaining TODOs:
structure
in the supertibble~Issue Addressed
Addresses #126 Addresses #169
PR Checklist
Before submitting this PR, please check and verify below that the submission meets the below criteria:
.RDS
) updated underinst/testdata/create_test_data.R
usethis::use_version()
Code Review
This section to be used by the reviewer and developers during Code Review after PR submission
Code Review Checklist