tests/testthat/test-classint_to_vector.R

# testthat::context("test-classint_to_vector")

x <- classInt::classIntervals(var = stats::runif(n = 100), style = "fisher", n = 5)

################################################################################

testthat::test_that("classint_to_vector returns n breaks", {

  present_classes <- classint_to_vector(x = x, digits = 3)

  testthat::expect_length(present_classes, n = 5)
})

Try the shar package in your browser

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

shar documentation built on Oct. 23, 2023, 9:06 a.m.