Skip to contents

Transforms the REDCap database (`DB` object) by applying the necessary field transformations. This function modifies the structure of the data and records according to the transformation rules specified.

Usage

transform_DB(DB, ask = T)

Arguments

DB

A validated `DB` object containing REDCap project data and settings. Generated using load_DB or setup_DB

ask

Logical (TRUE/FALSE). If TRUE, prompts the user for confirmation before proceeding with the transformation. Default is `TRUE`.

Value

The transformed `DB` object.

Details

This function checks if the database has already been transformed and applies the transformation if not. It stores the original column names before transforming the data. The transformation process can include modifying field values and renaming columns based on predefined transformation rules.

See also

save_DB for saving the transformed database object. untransform_DB for reverting the transformation.

Other db_functions: rmarkdown_DB(), summarize_DB(), update_DB()