tests/testthat/test-misc_functions.R

test_that(
  "validate_permutation is correct",
  {
    expect_equal(
      validate_permutation(c(1, 3, 3)),
      FALSE
    )
    expect_equal(
      validate_permutation(c(1, 2, 3)),
      TRUE
    )
    expect_equal(
      validate_permutation(c(1, NA_real_, 3, NA_real_)),
      TRUE
    )
    expect_equal(
      validate_permutation(c(NA_real_, NA_real_, NA_real_)),
      TRUE
    )
  }
)

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.