tests/testthat/test-multiAR.R

test_that("multiAR behaviour", {

  data(simTransComms)
  test.data <- simTransComms$community1[1:25,2:7]
  eg.multiAR1 <- multiAR(data = test.data, winsize = 50, dt = 1)

  expect_equal(dim(eg.multiAR1),c(NROW(test.data) - round(NROW(test.data)*0.5) + 1,2))
  expect_true(all(is.numeric(eg.multiAR1[,2])))
  expect_false(all(is.na(eg.multiAR1[,2])))

})

Try the EWSmethods package in your browser

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

EWSmethods documentation built on May 29, 2024, 5:41 a.m.