Add, replace, or remove model identifiers from the based_on field of a model object and corresponding YAML. The based_on field can be modified at any time (i.e. before or after a model is submitted).

add_based_on(.mod, .based_on)

replace_all_based_on(.mod, .based_on)

replace_based_on(.mod, .based_on)

remove_based_on(.mod, .based_on)

Arguments

.mod

The bbi_{.model_type}_model object to modify

.based_on

Character vector of relative paths to add or remove

Value

The modified bbi_{.model_type}_model object

Details

The based_on field on a bbi_{.model_type}_model object contains a character vector identifying models which preceded .mod in the model development process. This field is automatically populated with .parent_mod when a model is created with copy_model_from().

The model identifiers in the based_on field are paths another model file (without file extension) relative to the location of .mod.

There is a "Using the based_on field" vignette which demonstrates the motivation and usage of this field.

Functions

  • add_based_on: Append new based_on identifiers to a model object and corresponding YAML.

  • replace_all_based_on: Replaces entire based_on field in a model object and corresponding YAML with new values.

  • replace_based_on: Deprecated as of rbabylon 0.10.0, use replace_all_based_on() instead.

  • remove_based_on: Remove specified based_on identifier(s) from a model object and corresponding YAML.

See also