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 July 26, 2023, 5:16 p.m.