tests/testthat/test-detrend.R

context("test-detrend")

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

  X_detrend <- detrend(NIRsoil$spc, wav = as.numeric(colnames(NIRsoil$spc)))

  expect_is(X_detrend, "matrix")
  expect_true(round(max(X_detrend[1, ]), 5) == 2.57863)
})

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.