Skip to contents

Transition ODEs written in d/dt() format to matrix exponential / inductive linearization format

Usage

indLin(model, doConst = FALSE, calcSens = NULL)

rxOdeToIndLin(model, doConst = FALSE, calcSens = NULL)

rxToIndLin(model, doConst = FALSE, calcSens = NULL)

Arguments

model

rxode2 model, text, or function

doConst

Replace constants with values; By default this is FALSE.

calcSens

A character vector of parameter names for which sensitivities should be calculated.

Value

A character string representing the matrix exponential model code

Author

Matthew L. Fidler

Examples

# \donttest{
pk <- function() {
  model({
    d/dt(depot) <- -ka * depot
    d/dt(central) <- ka * depot - cl / v * central
  })
}
writeLines(indLin(pk))
#>  
#>  
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
#>  
#>  
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
#>  
#>  
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
#> matExp()
#> cmt(depot)
#> cmt(central)
#> k_depot_central = ka
#> k_central_output = cl/v
#> df(depot)/dy(depot) = -ka
#> df(central)/dy(depot) = ka
#> df(central)/dy(central) = -cl/v
# }