if (FALSE) {
if (requireNamespace("rxode2", quietly = TRUE)) {
# Called directly, this isn't that interesting, but can show what
# is produced for rxode2 integration
library(rxode2)
NN(1, state="t", min_init=0.1, max_init=24, pop=TRUE)
# This can be used in the rxode2 language as follows:
f_ode_pop <- function(){
ini({
lV <- 1
prop.err <- 0.1
})
model({
V <- lV
d/dt(centr) = NN(1, state=centr,min_init=0,max_init=300)
cp = centr / V
cp ~ prop(prop.err)
})
}
# but it expands to the complete model:
f_ode_pop()
# This is because pmxNODE uses the extensible user model interface
# in rxode2. This only works if you load rxode2/nlmixr2 and pmxNODE
}
}
Run the code above in your browser using DataLab