Skip to contents

Copies model file to new model file

Usage

copy_model(
  from,
  to,
  overwrite = FALSE,
  ext_file = NULL,
  update = "none",
  jitter = NULL,
  jitter_excluded = NULL,
  seed = NULL,
  description,
  based_on = NULL,
  tags = NULL,
  no_metadata = FALSE
)

Arguments

from

path to model file to copy or hyperion_nonmem_model object

to

path to model file to write to

overwrite

boolean, wheter to overwrite existing model. Default FALSE

ext_file

path to ext file to use for parameter estimates

update

character or character vector specifying which parameters to update from ext file. Options: "all", "none", "theta", "omega", "sigma". Examples: "all" or c("theta", "omega")

jitter

Single numeric value for parameter jittering using a uniform distribution. Each parameter value is multiplied by a random factor between (1 - jitter%) and (1 + jitter%) with boundary enforcement.

jitter_excluded

character or character vector of parameter names to exclude from jittering. Examples: "THETA1" or c("THETA1")

seed

integer for random number generator seed to ensure reproducible jittering

description

Description of model in metadata file

based_on

Character vector of model names/paths that this model is based on

tags

Character vector of tags to attach to the model in metadata

no_metadata

boolean, if true, does not create metadatafile, default FALSE

Value

path to new model file (invisible) todo

Examples

if (FALSE) { # \dontrun{
copy_model(from = "model/nonmem/run001.mod", to = "model/nonmem/run002.mod")
} # }