REDCapTidieR
REDCapTidieR copied to clipboard
[BUG] add_partial_keys() Doesn't fully capture arm regex
Issue Description
The add_partial_keys()
function is used to split events and arm names that REDCap provides as a single unique event name, ex: repeat_event_arm_1
. add_partial_keys()
will split this up into repeat_event
and 1
.
An oversight we made is when REDCap events are very similarly named:
REDCap can also add additional specifiers that aren't just the numeric value. This means we need to capture that, and convert the arm
column from an integer type to a factor type (so in the above example we capture 1b
as an arm
value.
This will be corrected in the upcoming #205
How to Reproduce the Bug:
The issue occurs here, due to limited regex definition: https://github.com/CHOP-CGTInformatics/REDCapTidieR/blob/82a49b713afff929c6d5df7230acab3085186b21/R/utils.R#L18-L34
Checklist
Before submitting this issue, please check and verify below that the submission meets the below criteria:
- [x] The issue is atomic
- [x] The issue description is documented
- [x] The issue title describes the problem succinctly
- [x] Developers are assigned to the issue
- [x] Labels are assigned to the issue