Conversation
Introduces a new `col_types` parameter to the `read_redcap` function, allowing users to specify column types via a readr::cols() object. Updates documentation and Rd files to reflect this addition. Also includes minor documentation corrections, code style improvements (removing unnecessary return statements), and updates to the vignette and test snapshots.
Expanded documentation for the col_types argument in read_redcap, including new sections in both R and Rd files to guide users on specifying column types. Enhanced warning messages in checks.R to suggest using col_types for correcting unexpected data types. Updated utility/refresh.R to exclude pipe_consistency_linter from checks.
Incremented package version to 1.2.4.9002 and updated NEWS.md to document the exposure of the `col_types` parameter from REDCapR, allowing manual specification of expected data type outputs.
ezraporter
approved these changes
Dec 31, 2025
Collaborator
ezraporter
left a comment
There was a problem hiding this comment.
One suggested change to the docs if you want it but I support merging as is too. Thanks for all the additional clean up as well!
Co-authored-by: Ezra Porter <60618324+ezraporter@users.noreply.github.com>
Collaborator
Author
|
Awesome, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR seeks to allow users access to the
col_typesparameter. This will help with tackling cases where REDCapR/readr do not correctly guess the data type of outputs. This only seems to happen in niche instances, and was brought to our attention in the example of a radio button/single selection field for M/F/Unk where all entered data was "F", resulting in an incorrect application of T/F for the field type.Proposed Changes
List changes below in bullet format:
col_typesinread_redcapand downstream inredcap_read_oneshotcol_typesparam and section roxygen documentationcheck_extra_field_values_message()which we may want to break out in future [FEATURE] Expand checks to look for mismatches between metadata and raw data #237Issue Addressed
Closes #236
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.Rusethis::use_version()Code Review
This section to be used by the reviewer and developers during Code Review after PR submission
Code Review Checklist