init: Methods for working with the model compartment list
Description
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.
name = value assignments to update the initial conditions list.
.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.
Details
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.
## example("init")mod <- mrgsolve::house()
init(mod)
init(mod, .pat="^C") ## may be useful for large modelsclass(init(mod))
init(mod)$CENT
as.list(init(mod))
as.data.frame(init(mod))