tests/testthat/test-chiSqPeriodogram.R

context("Test chiSqPeriodogram")

oscillation <- sin(seq(0, 2 * pi * 1, by = 2 * pi / 1440))
oscillation.df <- data.frame(dateTime = 1:length(oscillation), value = oscillation)

test_that("calc ChiSqPeriodogram",{
  result <- chiSqPeriodogram(oscillation.df)
  expect_equal(sum(result[1]), 6020)
})

Try the xsp package in your browser

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

xsp documentation built on May 1, 2019, 8:37 p.m.