tests/testthat/test-doctest-whv_hype.R

# Generated by doctest: do not edit by hand
# Please edit file in R/whv.R

test_that("Doctest: whv_hype", {
  # Created from @doctest for `whv_hype`
  # Source file: R/whv.R
  # Source line: 134
  expect_equal(whv_hype(matrix(2, ncol = 2), reference = 4, ideal = 1, seed = 42),
  3.99807)
  expect_equal(whv_hype(matrix(c(3, 1), ncol = 2), reference = 4, ideal = 1,
  seed = 42), 3.00555)
  expect_equal(whv_hype(matrix(2, ncol = 2), reference = 4, ideal = 1, seed = 42,
  dist = "exponential", mu = 0.2), 1.14624)
  expect_equal(whv_hype(matrix(c(3, 1), ncol = 2), reference = 4, ideal = 1,
  seed = 42, dist = "exponential", mu = 0.2), 1.66815)
  expect_equal(whv_hype(matrix(2, ncol = 2), reference = 4, ideal = 1, seed = 42,
  dist = "point", mu = c(2.9, 0.9)), 0.64485)
  expect_equal(whv_hype(matrix(c(3, 1), ncol = 2), reference = 4, ideal = 1,
  seed = 42, dist = "point", mu = c(2.9, 0.9)), 4.03632)
})

Try the moocore package in your browser

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

moocore documentation built on Aug. 8, 2025, 6:12 p.m.