tests/testthat/test-gapDer.R

context("test-gapDer")

test_that("gapDer works", {
  nirdata <- data("NIRsoil")

  X_gapDer <- gapDer(NIRsoil$spc, m = 1, w = 3)

  expect_is(X_gapDer, "matrix")
  expect_true(round(max(abs(X_gapDer[1, ])), 5) == 0.00517)
})

Try the prospectr package in your browser

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

prospectr documentation built on June 22, 2024, 11:08 a.m.