tests/testthat/test-forecast.R

# A unit test for forecast.gts() function
test_that("tests for 3 dots", {
  f1 <- forecast(htseg2, h = 4, algorithms = "lu")
  f2 <- forecast(htseg2, h = 4, ic = "aic", algorithms = "lu")
  
  expect_that(all(f1$bts == f2$bts), is_false())
})

Try the hts package in your browser

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

hts documentation built on April 1, 2018, 12:09 p.m.