Translate Nonmem filters to R code and apply to data
NMapplyFilters(data, file, lines, filters, invert = FALSE, as.fun, quiet)An input data object. Could be read with NMreadCsv or NMscanInput.
Path to mod/lst file. Only one of file or lines to be given. See `?NMreadSection` for understanding when to use, file, or lines. Only used when `filters` not provided.
The mod/lst as character, line by line.
A `data.frame` with filters as returned by `NMreadFilters()`. If not supplied, filters will be read from `file`/`lines`.
Invert the filters? This means read what Nonmem would disregard, and disregard what Nonmem would read.
The default is to return data as a data.frame. Pass a function (say tibble::as_tibble) in as.fun to convert to something else. If data.tables are wanted, use as.fun="data.table". The default can be configured using NMdataConf.
Don't report information along the way if no warnings or errors. Default is FALSE.
data with filters applied
This is not bulletproof. Nested conditions are not supported altogether.
NMreadFilters
Other Nonmem:
NMextractText(),
NMgenText(),
NMreadSection(),
NMreplaceDataFile(),
NMwriteSection()