Update for rxUi
Usage
# S3 method for class 'rxUi'
update(object, ..., envir = parent.frame())See also
Other Model UI and piping:
as.ini(),
as.model(),
as.rxUi(),
coef.rxUi(),
indLin(),
ini.rxUi(),
ini<-(),
linCmtMicro(),
linToOde(),
model.function(),
model<-(),
modelExtract(),
odeToLin(),
rxAppendModel(),
rxFixPop(),
rxFixRes(),
rxGetControl(),
rxRemoveControl(),
rxRename(),
rxSetControl(),
rxSetCovariateNamesForPiping(),
rxSetPipingAuto(),
rxUiDecompress(),
rxode2<-(),
zeroRe()
Examples
# \donttest{
mod <- function() {
ini({
tka <- log(1.1)
tcl <- log(3)
tv <- log(30)
add.sd <- 0.7
})
model({
ka <- exp(tka)
cl <- exp(tcl)
v <- exp(tv)
d/dt(depot) <- -ka * depot
d/dt(central) <- ka * depot - cl / v * central
cp <- central / v
cp ~ add(add.sd)
})
}
ui <- rxode2(mod)
#>
#>
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
# change an initial estimate and a model line in one call
update(ui, tka = log(2), v <- exp(tv) * 1.1)
#> ℹ change initial estimate of `tka` to `0.693147180559945`
#> ── rxode2-based free-form 2-cmt ODE model ──────────────────────────────────────
#> ── Initalization: ──
#> Fixed Effects ($theta):
#> tka tcl tv add.sd
#> 0.6931472 1.0986123 3.4011974 0.7000000
#>
#> States ($state or $stateDf):
#> Compartment Number Compartment Name
#> 1 1 depot
#> 2 2 central
#> ── Model (Normalized Syntax): ──
#> function() {
#> ini({
#> tka <- 0.693147180559945
#> tcl <- 1.09861228866811
#> tv <- 3.40119738166216
#> add.sd <- c(0, 0.7)
#> })
#> model({
#> ka <- exp(tka)
#> cl <- exp(tcl)
#> v <- exp(tv) * 1.1
#> d/dt(depot) <- -ka * depot
#> d/dt(central) <- ka * depot - cl/v * central
#> cp <- central/v
#> cp ~ add(add.sd)
#> })
#> }
# }
