tests/testthat/test-hard_sets.R

test_that("hard_sets() basic function", {
  expect_equal(hard_sets(c(5, 7, 10, 9, NA)), 3)
})

test_that("hard_sets() different cutoff value", {
  expect_equal(hard_sets(c(5, 7, 10, 9, 8, NA), cutoff = 9), 2)
})

Try the strength package in your browser

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

strength documentation built on Feb. 25, 2026, 5:07 p.m.