tests/testthat/test-label.R

test_that("test labels", {

  f <-   lotri({
    # Where initial conditions/variables are specified
    lka  <- log(1.15) ; label("log ka (1/h)")
    lcl  <- log(0.135) ;label("log Cl (L/h)")
    lv   <- log(8)   ;  label("log V (L)")
    prop.err <- 0.15; label("proportional error (SD/mean)")
    add.err  <- 0.6  ; label("additive error (mg/L)")
    eta.ka ~ 0.5   ; label("IIV ka")
    eta.cl ~ 0.1   ; label("IIV cl")
    eta.v  ~ 0.1   ; label("IIV v")
  })

  est <- lotriEst(f)

  w <- which(est$name == "add.err")

  expect_equal(est$label[w], "additive error (mg/L)")

})

Try the lotri package in your browser

Any scripts or data that you put into this service are public.

lotri documentation built on March 31, 2023, 8:49 p.m.