View source: R/modify-model-field.R
modify_model_field | R Documentation |
Helper functions for updating fields in a bbi_{.model_type}_model
object.
Note that calling modify_model_field()
or replace_model_field()
directly
is not recommended for most users because it requires knowing about the
internal structure of the model object. Instead, we recommend using the
friendlier helpers listed below in "See also" whenever possible.
modify_model_field(
.mod,
.field,
.value,
.append = TRUE,
.remove = FALSE,
.unique = TRUE,
.char_value = TRUE
)
replace_model_field(.mod, .field, .old_val, .new_val)
.mod |
The |
.field |
Character scalar of the name of the component to modify |
.value |
Whatever is to be added to |
.append |
If |
.remove |
If |
.unique |
If |
.char_value |
If |
.old_val |
The value to be replaced. If |
.new_val |
The value to insert in place of |
All functions in this family also check the object against the corresponding
YAML with check_yaml_in_sync()
before modifying it, and errors if they are
out of sync. After the object has been modified they will write the modified
object back to the YAML and update the model object in memory with an md5
digest of the newly written YAML.
replace_model_field()
: Replace a single item in a model field
add_tags()
replace_tag()
replace_all_tags()
remove_tags()
add_notes()
replace_note()
replace_all_notes()
remove_notes()
add_based_on()
replace_all_based_on()
remove_based_on()
add_description()
replace_description()
add_bbi_args()
replace_all_bbi_args()
modify_star()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.