tests/testthat/test-set_initial_values.R

test_that("set_initial_values works", {
  expect_s3_class(
    set_initial_values(), "BayesMallowsInitialValues"
  )
  expect_error(
    set_initial_values(rho_init = c(1, 1, 2)),
    "rho_init must be a proper permutation"
  )
  expect_error(
    set_initial_values(rho_init = c(NA, 1)),
    "rho_init cannot have missing values"
  )
})

Try the BayesMallows package in your browser

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

BayesMallows documentation built on Sept. 11, 2024, 5:31 p.m.