Add, replace, or remove tags on a model object and corresponding YAML. Tags can be modified at any time (i.e. before or after a model is submitted).
add_tags(.mod, .tags)
replace_tag(.mod, .old_tag, .new_tag)
replace_all_tags(.mod, .tags)
remove_tags(.mod, .tags)
The bbi_{.model_type}_model
object to modify
Character vector of tags to add or remove
Character scalar of tag to be replaced
Character scalar of tag that will be added
The modified bbi_{.model_type}_model
object
The tags
fields on a bbi_{.model_type}_model
object contains a character
vector of brief descriptors about the model. Often this is used to keep track
of the model structure, such as the covariates or error stucture that was
used.
One of the more useful things to do with tags is to use them for filtering a
bbi_run_log_df
(the tibble output from run_log()
); for example to look at
all models that used a particular random effect or covariate. To facilitate
this, it is recommended to keep individual tags consistent and short, and/or
to use a "glossary" of acceptable tags, stored elsewhere in your project
(i.e. in a .yaml
or .csv
or a named list that you can source). In other
words, if you tag one model with "CLAGE"
and another with
"ClearanceAgeCov"
, etc. then it will be very difficult to make any use of
those tags later, for instance when you want to filter to models with that
covariate.
Tags can also be collapsed using collapse_to_string()
to create a compact description of the
model stucture. See the "Getting Started" vignette
for an example of this.
add_tags()
: Add tags to a model object and corresponding YAML.
replace_tag()
: Replaces a specific .old_tag
with .new_tag
on a model object and corresponding YAML.
Warns and does nothing if .old_tag
is not present.
replace_all_tags()
: Replaces all tags on a model object and corresponding YAML with new tags.
remove_tags()
: Removes tags from a model object and corresponding YAML.