new_nm | R Documentation |
Create a new parent nm
object. Normally the first NONMEM object you create
will be using this function. Subsequent objects created with the child()
function will inherit the properties of the parent run.
new_nm(based_on, run_id = NA_character_, data_path, cmd, force = FALSE)
based_on |
Character. Relative path to an existing control file from
which to base this run. NMproject will not modify or run this control
file. Instead it will create a new control file specified by the
|
run_id |
Character. Run identifier. This is used to name the run and output files such as $TABLE outputs. |
data_path |
Character. Path to dataset. If this is not specified,
NMproject will try to guess based on the current $DATA components of the
file specified in |
cmd |
Optional character. PsN command to use. If unspecified will use
|
force |
(Default = |
The cmd
field uses glue
notation. So instead of specifying
execute runm1.mod -dir=m1
, it is best to specify execute {ctl_name} -dir={run_dir}
. The values of ctl_name
and run_dir
refer to object
fields and if these change value like when the child()
function is used to
create a separate child object, the cmd
field will update automatically.
An object of class nm_list
. Attributes can be viewed by printing
the object in the console.
Each field has a corresponding function (documented in nm_getsetters) of the same name to access and modify it's value.
The PsN run type. Default is execute
.
The run identifier. E.g. m1
.
The directory to copy control files and run NONMEM. Default = "Models".
For internal use.
Stores the contents of the control file to be written to disk when the
run_nm()
function is used on the object.
Path to the NONMEM ready dataset (from base project directory).
See details above.
Numbers of cores to use. Requires a cmd
value that uses the {cores}
glue field.
PsN directory to run the NONMEM run. Default is to the be the same as
the run_id
for simplicity.
Location to store results files from diagnostic reports executed with
nm_render()
.
For internal use.
Normally does not require setting. Path to the expected .lst file.
nm_getsetters()
, child()
# create example object m1 from package demo files exdir <- system.file("extdata", "examples", "theopp", package = "NMproject") m1 <- new_nm(run_id = "m1", based_on = file.path(exdir, "Models", "ADVAN2.mod"), data_path = file.path(exdir, "SourceData", "THEOPP.csv")) m1 ## display object fields cmd(m1) ctl_name(m1) run_dir(m1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.