rxAppendModel | R Documentation |
Append two rxui models together
rxAppendModel(..., common = TRUE)
... |
models to append together |
common |
boolean that determines if you need a common value to bind |
New model with both models appended together
Matthew L. Fidler
ocmt <- function() {
ini({
tka <- exp(0.45) # Ka
tcl <- exp(1) # Cl
tv <- exp(3.45); # log V
## the label("Label name") works with all models
add.sd <- 0.7
})
model({
ka <- tka
cl <- tcl
v <- tv
d/dt(depot) <- -ka * depot
d/dt(center) <- ka * depot - cl / v * center
cp <- center / v
cp ~ add(add.sd)
})
}
idr <- function() {
ini({
tkin <- log(1)
tkout <- log(1)
tic50 <- log(10)
gamma <- fix(1)
idr.sd <- 1
})
model({
kin <- exp(tkin)
kout <- exp(tkout)
ic50 <- exp(tic50)
d/dt(eff) <- kin - kout*(1-ceff^gamma/(ic50^gamma+ceff^gamma))
eff ~ add(idr.sd)
})
}
rxAppendModel(ocmt %>% model(ceff=cp,append=TRUE), idr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.