rc_cast | R Documentation |
REDCap structures data in a semi-wide format where there are 4 factor variables (record_id and the redcap event/repeat fields) followed by a column for each variable. This function will convert the redcap event and repeat to short hand notation and concatenate them, then append them to any variable names which require distinguishment based on these factors. These and any naturally wide variables will be 'zipped' (coalesced) row-wise so that the resulting data.frame has only a single row per record_id.
rc_cast(
record_data,
events = getOption("redcap_bundle")$event_data$unique_event_name,
id_field = getOption("redcap_bundle")$id_field
)
record_data |
Dataframe. Record data exported from REDCap |
events |
Character. Vector of redcap event names. By default this will be pulled from the data dictionary. |
id_field |
Character. Column name of the record_id field. |
Marcus Lehr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.