tests/testthat/SpcHeader_tests.R

library(geoSpectral)
library(testthat)

sptest = spc.example_spectra()
sptest@header = SpcHeaderAdd(sptest@header, sptest@ShortName, 10)
test_that("SpcHeaderAdd adds headers correctly", {
  expect_equal(sptest@header$a_nap, 10)
})

Try the geoSpectral package in your browser

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

geoSpectral documentation built on Feb. 20, 2020, 5:08 p.m.