tests/testthat/test-preparation.R

test_that("calc_window", {
  expect_equal(
    calc_epaker_weights(seq(0, 1, 0.1), c(0.2, 0.4), c(0.2, 0.4)),
    structure(c(0, 0.5625, 0.75, 0.5625, 0, 0, 0, 0, 0, 0, 0, 0,
                0.328125, 0.5625, 0.703125, 0.75, 0.703125, 0.5625, 0.328125,
                0, 0, 0), .Dim = c(11L, 2L))
  )
})

Try the ycevo package in your browser

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

ycevo documentation built on June 22, 2024, 10:58 a.m.