Skip to contents

Assign the ini block in the rxode2 related object

Usage

ini(x, envir = environment(x)) <- value

Arguments

x

rxode2 related object

envir

Environment where assignment occurs

value

Value of the object

Value

rxode2 related object

Author

Matthew L. Fidler

Examples

# \donttest{
mod <- function() {
  ini({
    tcl <- log(3)
    tv <- log(30)
  })
  model({
    cl <- exp(tcl)
    v <- exp(tv)
    d/dt(central) <- -cl / v * central
  })
}
ui <- rxode2(mod)
#>  
#>  
#> ℹ parameter labels from comments are typically ignored in non-interactive mode
#> ℹ Need to run with the source intact to parse comments
ini(ui) <- quote(ini({
  tcl <- log(4)
  tv <- log(40)
}))
ui
#>  ── rxode2-based free-form 1-cmt ODE model ────────────────────────────────────── 
#>  ── Initalization: ──  
#> Fixed Effects ($theta): 
#>      tcl       tv 
#> 1.386294 3.688879 
#> 
#> States ($state or $stateDf): 
#>   Compartment Number Compartment Name
#> 1                  1          central
#>  ── Model (Normalized Syntax): ── 
#> function() {
#>     ini({
#>         tcl <- 1.38629436111989
#>         tv <- 3.68887945411394
#>     })
#>     model({
#>         cl <- exp(tcl)
#>         v <- exp(tv)
#>         d/dt(central) <- -cl/v * central
#>     })
#> }
# }