[Stable]

Run nm objects. Uses system_nm() to submit the cmd() value of object.

run_nm_single(
  m,
  ignore.stdout = FALSE,
  ignore.stderr = FALSE,
  quiet = getOption("quiet_run"),
  intern = getOption("intern"),
  force = FALSE,
  cache_ignore_cmd = FALSE,
  cache_ignore_ctl = FALSE,
  cache_ignore_data = FALSE,
  return_cmd_only = FALSE
)

Arguments

m

An nm object.

ignore.stdout

Logical (default=TRUE). Parameter passed to system_nm().

ignore.stderr

Logical (default=TRUE). Parameter passed to system_nm().

quiet

Logical (default=FALSE). Should system_nm() output be piped to screen?

intern

Logical. intern argument to be passed to system_nm().

force

Logical (default = FALSE). Force run even results unchanged.

cache_ignore_cmd

Logical (default = FALSE). Should check cmd field with cache?

cache_ignore_ctl

Logical (default = FALSE). Should check control file contents with cache?

cache_ignore_data

Logical (default = FALSE). Should check dataset with cache?

return_cmd_only

Logical. Instead of running cmd, return the command information in the form of a tibble. This is intended for use in run_nm() batch submission.

Value

m with job_info fields populated.

Details

In grid environment it is recommended to run nm_tran() via the RStudio 'Addin' prior to executing this code.

By default, when highlighting code and evaluating it via an RStudio app, run_nm() will not execute and will just return the nm object.

For vector nm objects of length more than 1, all runs will be launched at the same time. This could overwhelm resources if not in a grid environment. In this case see run_nm() for batched execution of a vector valued nm object.

See also

Examples

## requires NONMEM to be installed
if (FALSE) {
m1 <- new_nm(
  run_id = "m1",
  based_on = "staging/Models/ADVAN2.mod",
  data_path = "DerivedData/data.csv"
) %>%
  cmd("execute {ctl_name} -dir={run_dir}") %>%
  fill_input() %>%
  run_nm()
}