tests/testthat/test_prob_remove.R

test_that("number of entries behaves as expected", {
  x = 1:10
  expect_lt(length(prob_remove(x, 0.5)), length(x))
  expect_equal(length(prob_remove(x, 1)), length(x))
  expect_equal(length(prob_remove(x, 0)), 0)
})

Try the StratPal package in your browser

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

StratPal documentation built on Dec. 6, 2025, 5:08 p.m.