read_nm_model {xpose}R Documentation

NONMEM model file parser

Description

Parse NONMEM model files in R format

Usage

read_nm_model(
  runno = NULL,
  prefix = "run",
  ext = ".lst",
  file = NULL,
  dir = NULL,
  check_ext = TRUE
)

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.

check_ext

Logical, if TRUE will provide an error message if the extension of the NONMEM input file is not one of '.lst', '.out', '.res', '.mod' or '.ctl' for NONMEM. If FALSE any file extension can be used.

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

## 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)


[Package xpose version 0.4.18 Index]