Reformat SDTM datasets into NONMEM-style modeling dataset
reformat_data_sdtm_to_modeling.RdReformat SDTM datasets into NONMEM-style modeling dataset
Arguments
- data
list containing data.frames with SDTM domains
- dictionary
a data dictionary that maps expected variable names to variables in the data.
- categorical_mapping
Either a character vector of column names to auto-encode (most common value gets 0, next gets 1, etc.), or a data.frame with columns
column,original_value,encoded_valuefor explicit mappings. NA values are encoded as -99. The final mapping is attached as a"categorical_mapping"attribute on the returned data.frame. DefaultNULLskips encoding.- na
what to set NA values to. E.g. ".", (default) or NA (keep NA), or NULL (do nothing).