tests/testthat/test-conditional-bandwidth-unused-dots-contract.R

test_that("conditional bandwidth selectors reject unused named dots", {
  set.seed(20260511)
  d <- data.frame(x = runif(30), y = rnorm(30))

  expect_error(
    npcdensbw(y ~ x, data = d, ckertype = "banana", nmulti = 1L),
    "unused argument"
  )
  expect_error(
    npcdistbw(y ~ x, data = d, ckertype = "banana", nmulti = 1L),
    "unused argument"
  )
})

Try the np package in your browser

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

np documentation built on May 16, 2026, 1:07 a.m.