tests/testthat/test-floor.R

test_that("floor", {
  floored <- dts_floor(dts_data[c(1,3),], units = "years")
  expect_identical(floored[c("Value", "Value2", "Value3")],
                   dts_data[c(1,3),c("Value", "Value2", "Value3")])
  expect_identical(dttr2::dtt_month(floored$DateTime), c(1L, 1L))
})
poissonconsulting/dts documentation built on March 10, 2024, 6:21 a.m.