read_nm_model: NONMEM model file parser

Description Usage Arguments Details Value File path generation See Also Examples

View source: R/read_nm_model.R

Description

Parse NONMEM model files in R format

Usage

1
2
read_nm_model(runno = NULL, prefix = "run", ext = ".lst",
  file = NULL, dir = NULL)

Arguments

runno

Run number to be used to generate model file name. Used in combination with prefix and ext.

prefix

Prefix to be used to generate model file name. Used in combination with runno and ext.

ext

Extension to be used to generate model file name.Should be one of '.lst' (default), '.out', '.res', '.mod' or '.ctl' for NONMEM.

file

Model file name (preferably a '.lst' file) containing the file extension. Alternative to prefix, runno and ext arguments.

dir

Location of the model files.

Details

A NONMEM model output file (i.e. .lst, .out or .res) should preferably be provided to read_nm_model to allow for a more extensive xpose summary. However in some cases these output files may not contain the model code, thus preventing xpose from identifying the associated output tables names. In such cases xpose will attempt to read the associated model file (i.e. .mod or .ctl) instead to find the model code. Note: it is important that between the naming convention between the NONMEM output and the model file remains consistent e.g. run001.lst should be associated with run001.mod.

Value

A tibble of class model containing the following columns:

File path generation

The rules for model file names generation are as follow:

See Also

xpose_data, read_nm_tables

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Using the `file` argument to import a model file:
nm_model <- read_nm_model(file = 'run001.lst', dir = 'models')

# Using the `runno` argument to import a model file:
nm_model <- read_nm_model(runno = '001', ext = '.lst', dir = 'models')

## End(Not run)

UUPharmacometrics/xpose documentation built on Aug. 17, 2018, 4:29 a.m.