partab: Construct a Parameter Table

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Merges data from rlog and lookup to describe model run parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
partab(
	run, 
	project = getwd(), 
	tool = "nm7", 
	file = filename(rundir, run, ".ctl"), 
	rundir = filename(project, run), 
	nmlog = file.path(rundir, "NonmemRunLog.csv"), 
	nmout = filename(rundir, run, ".lst"), 
	x = params(within = within, by = by, type = type, ...), 
	within = ctl2xml(readLines(file)), 
	by = "name", 
	as = c(NA, "estimate", "unit", "prse"), 
	type = "parameter", 
	append = NULL, 
	purge = FALSE, 
	...
)
wikitab(
	run, 
	project = getwd(), 
	tool = "nm7", 
	file = filename(rundir, run, ".ctl"), 
	rundir = filename(project, run), 
	nmlog = file.path(rundir, "NonmemRunLog.csv"), 
	nmout = filename(rundir, run, ".lst"), 
	x = params(within = within, by = by, type = type, ...), 
	within = ctl2xml(readLines(file)), 
	by = "model",
	type = "wiki", 
	append = NULL, 
	purge = FALSE, 
 	...
)

Arguments

run

scalar run name (number)

project

path to the directory containing run subdirectories

tool

‘nm6’ or ‘nm7’: controls methodology. Defaults to 'nm7' as of version 5.18.

file

the run-specific input file to read, contra rlog

rundir

path to run subdirectory

nmlog

The run-specific input file to read (nm6 only). See rlog.

nmout

The run-specific NONMEM output file to read (nm7 only). See rlog.

x

a vector of parameter names (character)

within

an XML ‘document’ containing parameter elements (character)

by

the parameter attribute by which to interpret x

as

vector of parameter attributes as which to describe x. Where NA, the text value of the element (if any) is returned.

type

the element type to seek in ‘within’

append

ignored; NULL is passed to rlog

purge

ignored; FALSE is passed to rlog

...

passed to lookup and rlog

Details

The idea here is to associate pre-specified model-specific identifiers with model output. Identifiers derive from some text file, such as a NONMEM model control stream. partab calls lookup to recover the identifiers, and rlog to access the results. The common key is ‘name’ by default in lookup, and ‘parameter’ by default in rlog. Caution is advisable when using these terms in other ways.

lookup only allows one value for as. Here, as can be a vector. The special value NA returns the text element for the parameter (cs. NULL in lookup).

This mechanism allows messy model details to be abstracted to a more appropriate location than a modeling script. Output is suitable as an argument to latex in package Hmisc.

wikitab is like partab, but only returns the 'model' attribute (default) and the element text for elements of type 'wiki' (default). It tries to guess the parameter names from the model attribute, using wikimath conventions (see tos), and then fold in the related details from the run log. wikitab is more restrictive than partab, but it lets all the usual parameter details arise from a single specification thereof.

Value

data.frame

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1
## Not run: metrumrgURL('example/project/script/parameters.pdf')

metrumrg documentation built on May 2, 2019, 5:55 p.m.