tests/testthat/test-greyscale.R

context("Greyscale tests")

test_that("rerange works as expected", {
	xnorm   <- rnorm(1000)
	xrange  <- seq(0, 1, length = 100)
	xrange2 <- seq(0, 2, length = 100)
	expect_that(range(poppr:::rerange(xnorm)), equals(c(0, 1)))
	expect_that(range(poppr:::rerange(xrange)), equals(c(0, 1)))
	expect_that(range(poppr:::rerange(xrange2)), equals(c(0, 1)))
})

Try the poppr package in your browser

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

poppr documentation built on Aug. 22, 2018, 5:03 p.m.