Assign the ini block in the rxode2 related object
Usage
ini(x, envir = environment(x)) <- valueSee also
Other Model UI and piping:
as.ini(),
as.model(),
as.rxUi(),
coef.rxUi(),
indLin(),
ini.rxUi(),
linCmtMicro(),
linToOde(),
model.function(),
model<-(),
modelExtract(),
odeToLin(),
rxAppendModel(),
rxFixPop(),
rxFixRes(),
rxGetControl(),
rxRemoveControl(),
rxRename(),
rxSetControl(),
rxSetCovariateNamesForPiping(),
rxSetPipingAuto(),
rxUiDecompress(),
rxode2<-(),
update.rxUi(),
zeroRe()
Examples
# \donttest{
mod <- function() {
ini({
tcl <- log(3)
tv <- log(30)
})
model({
cl <- exp(tcl)
v <- exp(tv)
d/dt(central) <- -cl / v * central
})
}
ui <- rxode2(mod)
#>
#>
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
ini(ui) <- quote(ini({
tcl <- log(4)
tv <- log(40)
}))
ui
#> ── rxode2-based free-form 1-cmt ODE model ──────────────────────────────────────
#> ── Initalization: ──
#> Fixed Effects ($theta):
#> tcl tv
#> 1.386294 3.688879
#>
#> States ($state or $stateDf):
#> Compartment Number Compartment Name
#> 1 1 central
#> ── Model (Normalized Syntax): ──
#> function() {
#> ini({
#> tcl <- 1.38629436111989
#> tv <- 3.68887945411394
#> })
#> model({
#> cl <- exp(tcl)
#> v <- exp(tv)
#> d/dt(central) <- -cl/v * central
#> })
#> }
# }
