Skip to contents

To convert from first order oral absorption to IV/Intravenous

Usage

removeDepot(model, central = "central", depot = "depot")

Arguments

model

The model as a function

central

This is a character vector that represents the central compartment in the model

depot

This is a character vector that represents the depot in the model

Value

Returns a model with the depot from a first order absorption model removed

Examples

readModelDb("PK_1cmt_des") |>
  removeDepot()
#>  
#>  
#> ! remove population parameter `lka`
#>  ── rxode2-based free-form 1-cmt ODE model ────────────────────────────────────── 
#>  ── Initalization: ──  
#> Fixed Effects ($theta): 
#>    lcl    lvc propSd 
#>   1.00   3.45   0.50 
#> 
#> States ($state or $stateDf): 
#>   Compartment Number Compartment Name
#> 1                  1          central
#>  ── Model (Normalized Syntax): ── 
#> function() {
#>     description <- "One compartment PK model with linear clearance using differential equations"
#>     ini({
#>         lcl <- 1
#>         label("Clearance (CL)")
#>         lvc <- 3.45
#>         label("Central volume of distribution (V)")
#>         propSd <- c(0, 0.5)
#>         label("Proportional residual error (fraction)")
#>     })
#>     model({
#>         cl <- exp(lcl)
#>         vc <- exp(lvc)
#>         kel <- cl/vc
#>         d/dt(central) <- -kel * central
#>         Cc <- central/vc
#>         Cc ~ prop(propSd)
#>     })
#> }