Extract data tibbles from a REDCapTidieR supertibble into a list
Extract data tibbles from a REDCapTidieR supertibble into a list
Take a supertibble generated with read_redcap()
and return a named list of data tibbles.
extract_tibbles(supertbl, tbls = everything())
Arguments
supertbl: A supertibble generated by read_redcap(). Required.
tbls: A vector of form_names or a tidyselect helper. Default is dplyr::everything().
Returns
A named list of tibbles
Details
This function makes it easy to extract a multiple instrument's data from a REDCapTidieR supertibble into a named list. Specifying instruments using tidyselect helper functions such as dplyr::starts_with()
or dplyr::ends_with() is supported.
Examples
superheroes_supertbl
# Extract all data tibblesextract_tibbles(superheroes_supertbl)# Only extract data tibbles starting with "heroes"extract_tibbles(superheroes_supertbl, starts_with("heroes"))