init | R Documentation |
Calling init()
with the model object as the first argument
will return the model initial conditions as a numericlist
object. See numericlist for methods to deal with
cmt_list
objects.
init(.x, ...)
## S4 method for signature 'mrgmod'
init(.x, .y = list(), ..., .pat = "*")
## S4 method for signature 'mrgsims'
init(.x, ...)
## S4 method for signature 'missing'
init(.x, ...)
## S4 method for signature 'list'
init(.x, ...)
## S4 method for signature 'ANY'
init(.x, ...)
.x |
the model object. |
... |
|
.y |
list to be merged into parameter list. |
.pat |
a regular expression (character) to be applied as a filter when printing compartments to the screen. |
Can be used to either get a compartment list object from a
mrgmod
model object or to update the compartment initial
conditions in a model object. For both uses, the return value
is a cmt_list
object. For the former use, init()
is usually called to print the compartment initial conditions
to the screen, but the cmt_list
object can also be coerced
to a list or numeric R object.
An object of class cmt_list
(see numericlist).
## example("init")
mod <- mrgsolve::house()
init(mod)
init(mod, .pat="^C") ## may be useful for large models
class(init(mod))
init(mod)$CENT
as.list(init(mod))
as.data.frame(init(mod))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.