REDCapTidieR icon indicating copy to clipboard operation
REDCapTidieR copied to clipboard

[FEATURE] Add select helpers `all_repeating()` and `all_nonrepeating()` to select forms by instrument type

Open ezraporter opened this issue 2 years ago • 2 comments

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_names 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:

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

ezraporter avatar Dec 14 '22 18:12 ezraporter