Skip to contents

Sanitise RedCap data columns

Usage

normalise_generic(
  rawData,
  mappings,
  remove_mapped = TRUE,
  remove_unmapped = TRUE,
  messages = c("files: {files}", "{.total} rows", "files from: {date}"),
  data_source_info = NULL,
  ...
)

Arguments

rawData
mappings

a set of mappings (see zzz-avoncap-mappings.R)

remove_mapped

gets rid of original columns for which we have a mapping (leaving the new versions)

remove_unmapped

gets rid of columns for which we do not have a mapping

messages

a set of dtrackr glue specs that populate the first box fo the flow chart. (can use {files}, {reproduce_at}, {date}, {.total})

data_source_info
  • if not null a filename, and the function will write out a file with the details of the input files used.

...

passed onto .cached(...). e.g. nocache = TRUE can be used to defeat caching.

Value

a tracked dataframe with mappings applied