nm: Create core NM object

nmR Documentation

Create core NM object

Description

Create new nm object. The function new_nm() is more convenient. This is mostly a back end function. This is the basic object this package centres around. Most package functions act on this object.

Usage

nm(
  run_id = NA_character_,
  run_in = nm_dir("models"),
  parent_run_id = NA_character_,
  parent_run_in = NA_character_,
  parent_ctl_name = NA_character_,
  parent_results_dir = NA_character_,
  ctl_name = "run{run_id}.mod",
  type = "execute",
  run_dir = "{run_id}",
  results_dir = nm_dir("results"),
  lst_path = "{run_dir}/NM_run1/psn.lst"
)

Arguments

run_id

Character vector. Run identifier.

run_in

Character vector. The location to copy the NONMEM control file and run location.

parent_run_id

Character vector (optional). The run identifier of the parent run.

parent_run_in

Character vector (optional). The location of the parent run.

parent_ctl_name

Character vector (optional). The ctl_name of the parent run.

parent_results_dir

Character vector (optional). The results_dir of the parent run.

ctl_name

Character. Name of control file.

type

Character (default = "execute"). Type of run to run.

run_dir

Character (default = "{run_id}"). Subdirectory where PsN will run NONMEM.

results_dir

Character (default = "Results"). Directory to store results of this run.

lst_path

Character (default = "{run_dir}/NM_run1/psn.lst") expected location of .lst file.

Value

An object of class nm_list. Object is concatenatable. Length of object corresponds to length of run_id.

Examples


m0 <- nm(run_id = "m0")
m0 ## a human readable representation

## nm objects can be put into tibbles to group runs together
d <- dplyr::tibble(run_id = c("m1", "m2"))
d$m <- nm(d$run_id)
d


tsahota/NMproject documentation built on Oct. 1, 2022, 11:51 a.m.