Skip to contents

Test if the rxode2 model has any parameters with user defined boundaries

Usage

testRxUnbounded(ui)

assertRxUnbounded(ui, extra = "", .var.name = .vname(ui))

warnRxBounded(ui, extra = "", .var.name = .vname(ui))

Arguments

ui

rxode2 ui

extra

extra information to append to the error message

.var.name

variable name

Value

boolean indicating if any parameters have user defined boundaries

Functions

  • assertRxUnbounded(): Assert that the rxode2 model has any parameters with user defined boundaries

  • warnRxBounded(): Warn that the rxode2 model has any parameters with user defined boundaries

Author

Matthew L. Fidler

Examples


one.cmt <- function() {
  ini({
    tka <- 0.45; label("Ka")
    tcl <- log(c(0, 2.7, 100)); label("Cl")
    tv <- 3.45; label("V")
    eta.ka ~ 0.6
    eta.cl ~ 0.3
    eta.v ~ 0.1
    add.sd <- 0.7
  })
  model({
    ka <- exp(tka + eta.ka)
    cl <- exp(tcl + eta.cl)
    v <- exp(tv + eta.v)
    linCmt() ~ add(add.sd)
  })
}

testRxUnbounded(one.cmt)
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> [1] FALSE

try(assertRxUnbounded(one.cmt))
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> Error : 'one.cmt' can not have user defined boundaries

warnRxBounded(one.cmt)
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> Warning: 'one.cmt' has the following user-defined boundaries: tcl