-
Notifications
You must be signed in to change notification settings - Fork 48
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
Unexpected Behavior: {Problem with dplyr internal call of redcap_read()} #538
Comments
Thanks for the details, @echaritos. What version of REDCap? These may be fields that were added a year or two ago. Did this function work before? If this is happening on a recent-ish version of REDCap, I'd like to know more about the scenario so I can modify the code and add regression tests. |
We are on 14.6.10
|
Yes the functions has been working without problems for 2 years now until today.
|
My suspicion is that the bug might be introduced when tibble is created internally from redcap_read()
|
Bummer. It looks like a problem with these two lines in the non-public function Can you try these calls (to test projects on our server)? If that works, can you replace your uri & token with the project you're having trouble with? uri <- "https://bbmc.ouhsc.edu/redcap/api/"
# A simple project (pid 153)
REDCapR:::redcap_metadata_internal(uri, "9A81268476645C4E5F03428B8AC3AA7B")$d_variable
# A longitudinal project (pid 212)
REDCapR:::redcap_metadata_internal(uri, "0434F0E9CF53ED0587847AB6E51DE762")$d_variable
# A repeating measures (pid 3181)
REDCapR:::redcap_metadata_internal(uri, "22C3FF1C8B08899FB6F86D91D874A159")$d_variable |
I had to downgrade to 1.1.0 because this was on our production server. The problem almost went away. I have the suspicion that it is not purely a problem of REDCapR but an interaction with it and tibble::. I'll try to test tomorrow but my test capability is very limited. Thanks for your help. |
|
Ok here are some more diagnostics. The issues seems to be with an interaction between dplyr and REDCapR 1.2.0 #With 1.2.0
#With 1.1.0
The error backtrace remains the same
in the old version i have deleted the output of column specifications. |
I am on REDCap 14.6.10 |
weird. I have the same package versions (with REDCapR 1.2.0) and don't see the error. The only difference is I'm running the current version of R (R 4.4.1). It sounds like you're locked into the version of R from 18 months ago (ie, 4.2.3)? I don't see why that would matter, but that's the only difference I see right now. I should have time tomorrow to debug things with you. If possible, can you try R 4.4.1 from another computer? |
It does not look like an R problem. Below the output from a current R version
|
redcap_read() on 1.1.0 works fine. It is 1.2.0 that returns the error |
one last thing to try. If this fails, let's get on a call and debug it together (if you'd like). Can you add all permissions to this user? That's the only thing I can think of that might be different from (a) you calling my server's project and (b) you calling your server's project. |
The user permissions is pretty much maxed out. This is certainly a new issue and behaviour. It seems to be an issue with dplyr::select() when called from redcap_read() but redcap_read_oneshot() is not affected. I am on GMT+2 time |
export_field_name is missing from metadata that REDCap sends
|
Here are some modifications that work for me as a temporary solution:
like
|
I have
but
It seems that the internal call of redcap_read() throws an error. I am able to read the projects metadata
The text was updated successfully, but these errors were encountered: