modify_based_on: Modify based_on field in a model object

modify_based_onR Documentation

Modify based_on field in a model object

Description

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).

Usage

add_based_on(.mod, .based_on)

replace_all_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

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.

Value

The modified ⁠bbi_{.model_type}_model⁠ object

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.

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

See Also

copy_model_from() modify_tags() modify_notes() modify_description() modify_bbi_args() modify_star()


metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.