tests/testthat/test_nin.R

test_that("nin", {
  expect_true(1 %nin% 2:3)
  expect_false(1 %nin% 1)
  expect_false(1 %nin% c(NA, 1))
  expect_true(1 %nin% c(NA, 2))
  expect_false(NA %nin% c(NA, 1))
  expect_true(NA %nin% 1:2)
})

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.