tests/testthat/test-rescale.R

context("rescale")

test_that("rescale preserves NAs even when x has zero range", {
  expect_equal(rescale(c(1, NA)), c(0.5, NA))
})
hadley/scales documentation built on Oct. 12, 2018, 12:04 p.m.