Closed rsh52 closed 1 year ago
I think the culprit is line 104 in utils.R
, in parse_labels()
:
strsplit(" \\| ") # Split by "|"
We're splitting by pipes surrounded by blanks. Here is what the select_choices_or_calculations
column are for the field in question:
1, one|2, two|3, three|4, four
a, A|b, B|c, C|d, D|e, E
No spaces! I think the fix is to split by pipe (without spaces) and then remove any padding whitespaces.
Expected Behavior
Checkboxes should be exported from REDCap appropriately.
Current Behavior
When testing with Will's example checkbox database, checkbox exports did not come out as expected:
https://github.com/OuhscBbmc/REDCapR/blob/main/inst/misc/example.credentials#L36
Screenshots In the image below, only two checkbox variables exist (
checkbox_one___1
,checkbox_two___a
), though there are multiple options for each of these in the REDCap client side UI.Checklist
Before submitting this issue, please check and verify below that the submission meets the below criteria: