Skip to contents

AvonCap data has lots of columns which are named in a difficult to remember fashion, composed of data items that have enumerated values with no semantics. This makes displaying them difficult and any filtering done on the raw data inscrutable. Depending on the source of the data some different columns may be present due to differences in the NHS and UoB data sets. The redcap database has some options that may be checklists and some that are radio buttons, both of these end up with mysterious names in the data.

Usage

normalise_data(rawData, instrument = NULL, ...)

Arguments

rawData
instrument

the numeric instrument number if applicable

...

Named arguments passed on to normalise_generic

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

mappings

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

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 n

Details

This function maps the data into a tidy dataframe with consistently named columns, and named factors where appropriate. The mapping is defined in data.

files Most of the sanitisation code is held in the normalise-xxx.R file. but these in turn may depend on the mapping-xxx.R files