Closed wibeasley closed 11 months ago
For redcap_read_oneshot()
, I'll won't interfere. The behavior is acceptable. However for redcap_read()
(which is what I push people to use by default), I'll throw an error if it's not a longitudinal project, or if the event name isn't recognized.
Tell me if someone has a better error message than these.
Error if non-longitudinal:
Error: This project is NOT longitudinal, so do not pass a value to the `event` argument.
Error if bad event names are passed:
Error: The following events are not recognized for this project: {bad_event_1, bad_event_2}.
Make sure you're using internal `event-name` (lowercase letters & underscores)
instead of the user-facing `event-label` (that can have spaces and uppercase letters).
when a bad/nonexistent event is passed, the columns get shuffled for
REDCapR::redcap_read()
but not forREDCapR::redcap_read_oneshot()
. These projects aren't longitudinal, so I guess the filtering code on the server never runs for events.This is returned by the playground for just the "blood_pressure" form. I can't enter a bad event.
This is the raw csv returned by the API with the bad event. Notice the server is changing the column order:
Created on 2023-07-09 with reprex v2.0.2