tests/testthat/test-depreciated_defunct.R

context("Defunct and Depreciated Functions")



test_that("Correct error for old, defunct plotting functions", {
  expect_error(plotNA.distribution(tsAirgap), class = "defunctError")
  expect_error(plotNA.distributionBar(tsAirgap), class = "defunctError")
  expect_error(plotNA.gapsize(tsAirgap), class = "defunctError")
  expect_error(plotNA.imputations(tsAirgap), class = "defunctError")
})


test_that("Correct warning for old, deprieciated imputation functions", {
  expect_warning(na.interpolation(tsAirgap), regexp = "replaced by")
  expect_warning(na.kalman(tsAirgap), regexp = "replaced by")
  expect_warning(na.locf(tsAirgap), regexp = "replaced by")
  expect_warning(na.ma(tsAirgap), regexp = "replaced by")
  expect_warning(na.mean(tsAirgap), regexp = "replaced by")
  expect_warning(na.random(tsAirgap), regexp = "replaced by")
  expect_warning(na.remove(tsAirgap), regexp = "replaced by")
  expect_warning(na.replace(tsAirgap), regexp = "replaced by")
  expect_warning(na.seadec(tsAirgap), regexp = "replaced by")
  expect_warning(na.seasplit(tsAirgap), regexp = "replaced by")
})

Try the imputeTS package in your browser

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

imputeTS documentation built on Sept. 9, 2022, 9:05 a.m.