By default, this compares a model's tags to the tags on any of its "parent" models. A parent model is any model referenced in the relevant model's based_on field. The bbi_model dispatch can optionally take a second model, in which case it will compare the first model to the second model, ignoring the based_on field entirely.

tags_diff(.bbi_object, .mod2 = NULL, .print = TRUE, ...)

add_tags_diff(.log_df)

Arguments

.bbi_object

The object to compare. Could be a bbi_{.model_type}_model object or a tibble of class bbi_run_log_df.

.mod2

If a bbi_{.model_type}_model object is passed, compare .bbi_object to .mod2. If .mod2 = NULL, the default, compare the .bbi_object model to any models in its based_on field. Only valid for bbi_model method.

.print

If TRUE, the default, will print a nicely formatted version of the returned list to the console. Only valid for bbi_model method.

...

arguments passed through to methods. (Currently none.)

.log_df

a bbi_run_log_df tibble (the output of run_log())

Value

In all cases:

  • tags_added contains any tags that are on the relevant model, but not on any of the models it is based on.

  • tags_removed contains any tags that are on at least one of the models it is based on, but not on the relevant model.

tags_diff.bbi_model() invisibly returns a list with two elements: tags_added and tags_removed. The list is returned invisibly because, by default, a nicely formatted version of the same information is printed to the console. User can pass .print = FALSE to turn this off.

tags_diff.bbi_run_log_df() returns a named list of lists, with one element for each row in the input tibble, with the name corresponding to the value in the run column for that row. Each element of the list will contain the two-element list returned from tags_diff.bbi_model() (described above) for the relevant model.

add_tags_diff() returns the same tibble that was passed to it, but it, but with two additional columns tags_added and tags_removed

appended.