within | R Documentation |
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
## S3 method for class 'mrgmod'
within(data, expr, ...)
data |
an object with class mrgmod |
expr |
expressions evaluated in an environment containing various model object components, including parameters, initial conditions, and others (see details) |
... |
not used |
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.
update
mod <- mrgsolve::house()
mod2 <- within(mod, {CL <- CL * 1.5})
mod$CL
mod2$CL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.