NMapplyFilters: Translate filters in Nonmem and apply to data

View source: R/NMapplyFilters.R

NMapplyFiltersR Documentation

Translate filters in Nonmem and apply to data

Description

Translate filters in Nonmem and apply to data

Usage

NMapplyFilters(data, file, text, lines, invert = FALSE, as.fun, quiet)

Arguments

data

An input data object. Could be read with NMreadCsv or NMscanInput.

file

Path to mod/lst file. Only one of file, text, or lines to be given. See ?NMreadSection for understanding when to use, file, text, or lines.

text

The mod/lst as characters.

lines

The mod/lst as character, line by line.

invert

Invert the filters? This means read what Nonmem would disregard, and disregard what Nonmem would read.

as.fun

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.

quiet

Don't report information along the way if no warnings or errors. Default is FALSE.

Details

This is not bulletproof. Nested conditions are not supported altogether.

Value

data with filters applied

See Also

Other Nonmem: NMextractText(), NMgenText(), NMreadSection(), NMreplaceDataFile(), NMwriteSection()


NMdata documentation built on Nov. 11, 2023, 5:07 p.m.