tests/testthat/test-doctest-hypervolume.R

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

test_that("Doctest: hypervolume", {
  # Created from @doctest for `hypervolume`
  # Source file: R/hv.R
  dat = matrix(c(5, 5, 4, 6, 2, 7, 7, 4), ncol = 2, byrow = TRUE)
  expect_equal(hypervolume(dat, ref = c(10, 10)), 38)
  expect_equal(hypervolume(dat, ref = 0, maximise = TRUE), 39)
  data(SPEA2minstoptimeRichmond)
  expect_equal(hypervolume(SPEA2minstoptimeRichmond[, 1:2], reference = c(250, 0),
  maximise = c(FALSE, TRUE)), 7911375.69)
})

Try the moocore package in your browser

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

moocore documentation built on July 12, 2026, 5:06 p.m.