R/copy-model-from.R
copy_model_as_nmbayes.Rd
Like bbr::copy_model_from()
, but switch the model type from "nonmem" to
"nmbayes" to begin defining a NONMEM Bayes model.
copy_model_as_nmbayes(
.parent_mod,
.new_model = NULL,
.description = NULL,
.based_on_additional = NULL,
.add_tags = NULL,
.star = NULL,
.inherit_tags = FALSE,
.update_model_file = TRUE,
.overwrite = FALSE
)
A bbi_nonmem_model
object to copy. This should not be
a bbi_nmbayes_model
subclass; in that case, use bbr::copy_model_from()
to copy the model in the standard way.
Path to the new model, either absolute or relative to the
path to .parent_mod
. Represents an absolute model path, which is the path
to the YAML file and model file, both without extension, and the output
directory (once the model is run). Numeric values will be coerced to
character. If NULL
, the default, will try to increment to the next integer
in the destination directory. See examples for usage.
Character scalar description of new model run. This will
be stored in the yaml (and can be viewed later in run_log()
).
Character vector of path(s) to other models that
this model was "based on." These are used to reconstuct model developement
and ancestry. Paths must be relative to .new_model
path. Note that
the .parent_model
will automatically be added to the based_on
field, so
no need to include that here.
Character vector with any new tags(s) to be added to
{.new_model}.yaml
Boolean, marks model to indicate special interest level.
If FALSE
, the default, new model will only have any
tags passed to .add_tags
argument. If TRUE
inherit any tags from
.parent_mod
, with any tags passed to .add_tags
appended.
Whether to update the newly created model file. If
TRUE
, the model will be adjusted by copy_model_from()
. In addition, any
existing estimation records will be deleted, and the two estimation records
required for nmbayes models will be added along with a comment.
If FALSE
, the default, function will error if a model
file already exists at specified .new_model
path. If TRUE
any existing
file at .new_model
will be overwritten silently.
A bbi_nmbayes_model
object for the new model.
bbr_nmbayes for a high-level description of how NONMEM Bayes models are structured in bbr