tests/testthat/test-preprocess.R

test_that("lambda length is tested", {
  mod <- exmodel(add_exdata = F)
  dat <- exdata()

  expect_equal(
    preprocess.ofv.fix(x = mod, data = dat, lambda = .1)$lambda,
    .1
  )

  expect_error(
    preprocess.ofv.fix(x = mod, data = dat, lambda = c(.1, .2, .3, .4)),
    "\"lambda\" must be of length 1."
  )

})

Try the mapbayr package in your browser

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

mapbayr documentation built on Aug. 21, 2025, 5:28 p.m.