tests/testthat/test-helpers_knitr_GeneralModel.R

test_that("knit_print works ok for LogisticNormalMixture", {
  model <- LogisticNormalMixture(
    comp1 = ModelParamsNormal(
      mean = c(-0.85, 1),
      cov = matrix(c(1, -0.5, -0.5, 1), nrow = 2)
    ),
    comp2 = ModelParamsNormal(
      mean = c(0.85, 1),
      cov = matrix(c(1, -0.5, -0.5, 1), nrow = 2)
    ),
    weightpar = c(a = 1, b = 1),
    ref_dose = 50
  )

  result <- knitr::knit_print(model)
  expect_snap(cat(result))
})

Try the crmPack package in your browser

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

crmPack documentation built on July 5, 2026, 9:06 a.m.