tests/testthat/test-doctest-hv_contributions.R

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

test_that("Doctest: hv_contributions", {
  # Created from @doctest for `hv_contributions`
  # Source file: R/hv.R
  # Source line: 164
  x <- matrix(c(5, 1, 1, 5, 4, 2, 4, 4, 5, 1), ncol = 2, byrow = TRUE)
  expect_equal(hv_contributions(x, reference = c(6, 6)), c(0, 3, 3, 0, 0))
  expect_equal(hv_contributions(x, reference = c(6, 6), ignore_dominated = FALSE),
  c(0, 3, 2, 0, 0))
})

Try the moocore package in your browser

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

moocore documentation built on Jan. 11, 2026, 9:06 a.m.