Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

within

Update parameters, initials, and settings within a model object


Description

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

Usage

## S3 method for class 'mrgmod'
within(data, expr, ...)

Arguments

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

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.

See Also

Examples

mod <- mrgsolve::house()

mod2 <- within(mod, {CL <- CL * 1.5})

mod$CL
mod2$CL

mrgsolve

Simulate from ODE-Based Models

v0.11.1
GPL (>= 2)
Authors
Kyle T Baron [aut, cre] (<https://orcid.org/0000-0001-7252-5656>), Bill Gillespie [ctb], Charles Margossian [ctb], Devin Pastoor [ctb], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Dilawar Singh [ctb], Felicien Le Louedec [ctb] (<https://orcid.org/0000-0003-3699-2729>), Timothy Waterhouse [ctb] (<https://orcid.org/0000-0002-0954-9660>), Metrum Research Group [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.