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 Sept. 20, 2023, 5:06 p.m.