tests/test-collapse.r

context("collapse.hyperSpec")

test_that("BARBITURATES", {
  new <- do.call (collapse, barbiturates)
  wl <- sort (unique (unlist (lapply (barbiturates, slot, "wavelength"))))
  expect_that (sort (wl (new)), equals (wl))

  expect_that (sort (unlist (lapply (barbiturates, function (x) as.numeric (x@data$spc)))),
               equals (sort (unclass (new$spc[! is.na (new$spc)]))))
})

Try the hyperSpec package in your browser

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

hyperSpec documentation built on May 2, 2019, 5:45 p.m.