Test if the rxode2 model has any parameters with user defined boundaries
Source:R/assert.R
testRxUnbounded.Rd
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))
Functions
assertRxUnbounded()
: Assert that the rxode2 model has any parameters with user defined boundarieswarnRxBounded()
: Warn that the rxode2 model has any parameters with user defined boundaries
See also
Other Assertions:
assertCompartmentExists()
,
assertCompartmentName()
,
assertCompartmentNew()
,
assertRxUi()
,
assertVariableExists()
,
assertVariableNew()
,
testIniDf()
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