tests/testthat/test-doctest-pareto_rank.R

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

test_that("Doctest: pareto_rank", {
  # Created from @doctest for `pareto_rank`
  # Source file: R/nondominated.R
  three_fronts = matrix(c(1, 2, 3, 3, 1, 2, 2, 3, 1, 10, 20, 30, 30, 10, 20, 20,
    30, 10, 100, 200, 300, 300, 100, 200, 200, 300, 100), ncol = 3, byrow = TRUE)
  expect_equal(pareto_rank(three_fronts), c(1, 1, 1, 2, 2, 2, 3, 3, 3))
  split.data.frame(three_fronts, pareto_rank(three_fronts))
})

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.