tests/testthat/test_aggregate_dt.R

x <- tibble::tibble(x = lubridate::today() + seq_len(365), y = seq_len(365))

test_that("Aggregation of date-time works", {
    expect_silent(aggregate_dt(x, "x", "week", NULL, list(
        y = c("mean", "sd", "missing", "var", "sum")
    )))
    check_eval(aggregate_dt(x, "x", "week", NULL, list(y = "mean")))
})
iNZightVIT/iNZightTools documentation built on June 13, 2025, 12:35 p.m.