tests/testthat/test-full_w.R

test_that("full_w works", {

  x <- c(10, 13, 8, 12, 6, 15, 9, 11, 10)
  date <- c("2023-06-28", "2023-06-29", "2023-06-30", "2023-07-01", "2023-07-02", "2023-07-03", "2023-07-04", "2023-07-05", "2023-07-06")
  df <- data.frame(date, x)

  expect_identical(full_w(df, date = "2023-06-30", x = "x"), 43)
  expect_identical(full_w(df, date = "2023-07-05", x = "x"), 51)

  })

Try the iperform package in your browser

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

iperform documentation built on May 29, 2024, 3:19 a.m.