convert_mixed_instrument: Convert Mixed Structure Instruments to Repeating Instruments

convert_mixed_instrumentR Documentation

Convert Mixed Structure Instruments to Repeating Instruments

Description

For longitudinal projects where users set allow_mixed_structure to TRUE, this function will handle the process of setting the nonrepeating parts of the instrument to repeating ones with a single instance.

Usage

convert_mixed_instrument(db_data_long, mixed_structure_ref)

Arguments

db_data_long

The longitudinal REDCap database output defined by REDCapR::redcap_read_oneshot()$data

mixed_structure_ref

Reference dataframe containing mixed structure fields and forms.

Value

Returns a tibble with list elements containing tidy dataframes. Users can access dataframes under the redcap_data column with reference to form_name and structure column details.


REDCapTidieR documentation built on April 3, 2025, 10:50 p.m.