tests/testthat/test_shuffle.R

test_that("shuffle", {
  x = shuffle(1:3)
  expect_true(setequal(x, 1:3))

  x = shuffle(10L)
  expect_identical(x, 10L)

  expect_error(shuffle(10L, 2L))
})

Try the mlr3misc package in your browser

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

mlr3misc documentation built on April 4, 2025, 1:51 a.m.