create_updated_modfiles: Create multiple NONMEM model files with updated initial...

View source: R/create_updated_modfiles.R

create_updated_modfilesR Documentation

Create multiple NONMEM model files with updated initial estimates

Description

The point of this function is to enable creation of multiple NONMEM model files, with updated initial estimates when possible. It is possible to copy a single model file multiple times or to create multiple output model files from multiple input model files.

Usage

create_updated_modfiles(
  dir_input_files = "",
  input_model_files,
  dir_output_files = "",
  output_model_files,
  overwrite = TRUE,
  update_psn_based_on = TRUE
)

Arguments

dir_input_files

character. Contains path to directory containing the input model files. Defaults to "".

input_model_files

character vector of length 1 or n equal to the number of output files. Contains name(s) of model(s) to be copied with updated parameter initial estimates.

dir_output_files

character. Contains path to directory containing the output model files. Defaults to "".

output_model_files

character vector of length n. Contains name(s) of new model file(s).

overwrite

boolean of length 1. If TRUE and output_model_files refers to an already existing file, the existing file will be overwritten. Defaults to TRUE.

update_psn_based_on

boolean of length 1. If TRUE the PsN generated comment "Based on:" will be updated or created in the first line of the code if absent. Defaults to TRUE.

Value

New .mod files created

Examples

## Not run: create_updated_modfiles("../NONMEM/"
                                 "run1.mod",
                                 "../NONMEM",
                               c("run2.mod","run3.mod"))
## End(Not run)

Vincent-AC/vacactions documentation built on Aug. 22, 2023, 2:33 p.m.