redcap.rune {wizaRdry} | R Documentation |
Parse composite REDCap instrument into component data frames by variable prefix
Description
This function fetches a REDCap instrument and separates it into individual data frames for each survey/collection detected in the data based on column name prefixes. It identifies the appropriate identifier column and splits the data accordingly.
Usage
redcap.rune(
instrument_name,
raw_or_label = "raw",
redcap_event_name = NULL,
batch_size = 1000,
records = NULL,
fields = NULL,
exclude_pii = TRUE,
interview_date = NULL,
date_format = "ymd",
lower = TRUE
)
Arguments
instrument_name |
Name of the REDCap instrument |
raw_or_label |
Whether to return raw or labeled values |
redcap_event_name |
Optional event name filter |
batch_size |
Number of records to retrieve per batch |
records |
Optional vector of specific record IDs |
fields |
Optional vector of specific fields |
exclude_pii |
Default TRUE remove all fields marked as identifiable |
interview_date |
Optional; date filtering parameter |
date_format |
Default ymd define date format for interview_date |
lower |
default TRUE convert prefixes to lower case |
Value
Creates multiple dataframes in the parent environment, one for each survey detected in the data. Each dataframe is named after its survey prefix.