CHOP-CGTInformatics / REDCapTidieR

Makes it easy to read REDCap Projects into R
https://chop-cgtinformatics.github.io/REDCapTidieR/
Other
33 stars 8 forks source link

Update REDCapR to 1.2.0, update guess_max to Inf #202

Closed rsh52 closed 2 months ago

rsh52 commented 2 months ago

Description

This PR addresses a backlog issue that can now be fixed with the release of REDCapR 1.2.0.

In short, there was an assertion in the REDCapR code that failed on supplying Inf to guess_max, which we want to have as the default when guessing column types with the readr package. It would result in this error from our UI:

Error in `read_redcap()`:
✖ The REDCapR export operation was not successful.
! An unexpected error occured.
ℹ This means that you probably discovered a bug!
ℹ Please consider submitting a bug report here: <https://github.com/CHOP-CGTInformatics/REDCapTidieR/issues>.
Caused by error in `redcap_read_oneshot()` at REDCapTidieR/R/read_redcap.R:182:5:
! Assertion on 'guess_max' failed: Must be of type 'integerish', but element 1 is not in integer range.
Run `rlang::last_trace()` to see where the error occurred.

Now that REDCapR is updated, we can use Inf as the default.

Proposed Changes

List changes below in bullet format:

Issue Addressed

Closes #145

PR Checklist

Before submitting this PR, please check and verify below that the submission meets the below criteria:

Code Review

This section to be used by the reviewer and developers during Code Review after PR submission

Code Review Checklist