REDCapTidieR
REDCapTidieR copied to clipboard
[FEATURE] Add select helpers `all_repeating()` and `all_nonrepeating()` to select forms by instrument type
Feature Request Description
These functions would work with extract_tibbles()
and eventually extract_tibble()
to make it easy to select all forms of a certain type.
Suggested usage:
extract_tibbles(supertbl, tbls = all_repeating())
extract_tibbles(supertbl, tbls = all_repeating() & starts_with("infusion_"))
Proposed Solution
We may need to do some additional digging to figure out how to implement this. Currently we implement tidyselect
functionality by creating a tibble
where redcap_form_name
s are column names and applying tidyselect
functions to that tibble
. That would no longer work if we wanted selectors that take into account form attributes besides the names (such as types).
I found these helpful for thinking a bit about the issue:
-
tidyselect::peek_vars()
andtidyselect::peek_data()
- Implementation of basic
tidyselect
helpers - Implementation of
recipes
selectors which is modeled aftertidyselect
but for recipes rather thantibble
s
Checklist
- [x] The issue is atomic
- [x] The issue description is documented
- [x] The issue title describes the problem succinctly
- [ ] Developers are assigned to the issue
- [x] Labels are assigned to the issue