tests/testthat/test-edge-constant.R

test_that("constant signal does not crash and reconstructs", {
  x <- rep(5, 800)
  res <- rfif(x)

  recon <- colSums(res$imfs) + res$residual
  expect_lt(max(abs(recon - x)), 1e-8)
})

Try the RFIF package in your browser

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

RFIF documentation built on March 31, 2026, 5:07 p.m.