The main use case for using within rather than update or param or init is when you want to update to a new value that is calculated from the existing value. See the example in details
Details
Other model object slots that can be updated: start, end, delta,
add, rtol, atol, hmax, maxsteps. These are include for convenience,
but we expect that most of the time these will get updated through the
update method.
Examples
mod <- mrgsolve::house()
mod2 <- within(mod, {CL <- CL * 1.5})
mod$CL
#> [1] 1
mod2$CL
#> [1] 1.5