This function stores the user inputs as the updated values of symbols. List of symbol names and symbol types will be updated automatically. There is no protection for values that should not be modified, which may lead to error or loss of binding of some objects. Please use this function with caution.
Arguments
- sym_name
Vector or List. A sequence of character symbol names.
- sym_value
Vector or List. A sequence of symbol values.
Examples
# Constant variable
a <- 1
# Random uniform variable
z <- closed_form(~2 + a)
z$compute()
#> [1] 3
# Update value for "a"
z$set_sym("a", 3)
z$compute()
#> [1] 5
# Update value for "+"
z$set_sym("+", list(function(a, b) a * b))
z$compute()
#> [1] 6