View source: R/copy-model-from.R
copy_model_from | R Documentation |
Create new model by copying existing model. Useful for iterating during model
development. Also fills based_on
field by default, for constructing model
ancestry. See "Using based_on field" vignette for details.
copy_model_from(
.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
)
## S3 method for class 'bbi_nonmem_model'
copy_model_from(
.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
)
.parent_mod |
Model to copy from |
.new_model |
Path to the new model, either absolute or relative to the
path to |
.description |
Character scalar description of new model run. This will
be stored in the yaml (and can be viewed later in |
.based_on_additional |
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 |
.add_tags |
Character vector with any new tags(s) to be added to
|
.star |
Boolean, marks model to indicate special interest level. |
.inherit_tags |
If |
.update_model_file |
Only relevant to NONMEM models. If |
.overwrite |
If |
copy_model_from(bbi_nonmem_model)
: .parent_mod
takes a bbi_nonmem_model
object to use as a basis for the copy.
new_model()
, update_model_id()
## Not run:
parent <- read_model("/foo/parent")
# create model file at /bar/child.ctl and YAML at /bar/child.yaml
copy_model_from(parent, "/bar/child", "child model with absolute path")
# create model file at /foo/child.ctl and YAML at /foo/child.yaml
copy_model_from(parent, "child", "relative to parent model path")
mod1 <- read_model("/path/to/1")
# create model file at /path/to/2.ctl and YAML at /path/to/2.yaml
copy_model_from(mod1, "increments to next integer by default")
# create model file at /path/to/3.ctl and YAML at /path/to/3.yaml
copy_model_from(mod1, 3, "numeric input works")
# create model file at /path/to/100.1.ctl and YAML at /path/to/100.1.yaml
copy_model_from(mod1, 100.1, "a period is okay")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.