tests/testthat/test-doctest-hv_approx.R

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

test_that("Doctest: hv_approx", {
  # Created from @doctest for `hv_approx`
  # Source file: R/hv_approx.R
  # Source line: 46
  x <- matrix(c(5, 5, 4, 6, 2, 7, 7, 4), ncol = 2, byrow = TRUE)
  expect_equal(hypervolume(x, ref = 10), 38)
  expect_equal(hv_approx(x, ref = 10, seed = 42, method = "DZ2019-MC"), 38.014754)
  expect_equal(hv_approx(x, ref = 10, method = "DZ2019-HW"), 37.99989)
})

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.