tests/testthat/test-utils_rescale_vector.R

test_that("`utils_rescale_vector()` works", {
  out <- utils_rescale_vector(
    x = stats::rnorm(100), new_min = 0,
    new_max = 100,
  )
  expect_equal(range(out), c(0, 100))
})

Try the distantia package in your browser

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

distantia documentation built on April 4, 2025, 5:42 a.m.