tests/testthat/test-zoo_to_tsl.R

test_that("`zoo_to_tsl()` works", {
  x <- zoo_simulate(seed = 1)

  tsl <- zoo_to_tsl(x = x)
  expect_equal(class(tsl), "list")
  expect_equal(class(tsl[[1]]), "zoo")
  expect_equal(names(tsl), "A")
  expect_equal(attributes(tsl[[1]])$name, "A")
})

Try the distantia package in your browser

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

distantia documentation built on April 4, 2025, 5:42 a.m.