Convert linCmt rxUi models to ODE rxUi models
Examples
oneCmt <- function() {
ini({
tka <- 0.45
tcl <- log(2.7)
tv <- 3.45
add.sd <- 0.7
})
model({
ka <- exp(tka)
cl <- exp(tcl)
v <- exp(tv)
cp <- linCmt()
cp ~ add(add.sd)
})
}
oneCmtOde <- linToOde(oneCmt)
#>
#>
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
pkpd <- function() {
ini({
ka <- 1
cl <- 2
v <- 20
kin <- 1
kout <- 1
ec50 <- 2
})
model({
cp <- linCmt(ka, cl, v)
eff(0) <- 1
d/dt(eff) <- kin - kout * (1 - cp/(ec50 + cp)) * eff
})
}
pkpdOde <- linToOde(pkpd)
#>
#>
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
