tests/testthat/test-movav.R

context("test-movav")

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

  X_movav <- movav(NIRsoil$spc, 5)

  expect_is(X_movav, "matrix")
  expect_true(round(max(X_movav[1, ]), 5) == 0.37237)
})

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.