Why can’t you use functions?
They address the issue of automatic updating but require excessive computation.
temp_c <- 10
temp_f <- function() {
message("Converting")
(temp_c * 9 / 5) + 32
}
temp_f()
#> Converting
#> [1] 50
# temp_f automatically updated
temp_c <- -3
temp_f()
#> Converting
#> [1] 26.6
# but does unnecessary computation (recomputes every time it's called)
temp_f()
#> Converting
#> [1] 26.6