tests/testthat/test_generics.R

obj <- kdensity(mtcars$mpg, kernel = "gaussian", start = "gumbel")

expect_equal(obj$h, obj[["h"]])
expect_s3_class(logLik(obj), "logLik")

expect_equal(
  update(obj, x = 1:100)(1:10),
  kdensity(1:100, kernel = "gaussian", start = "gumbel")(1:10)
)

Try the kdensity package in your browser

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

kdensity documentation built on Oct. 28, 2026, 5:06 p.m.