tests/testthat/test_assignments.R

context("assignments and updates")

cars$dist %>%
  kdensity(kernel = "gamma") ->
  obj

expect_equal(obj$start_str, "uniform")

update(obj, start = "gamma")
expect_equal(obj$start_str, "gamma")

obj[["start"]] = "gaussian"
expect_equal(obj$start_str, "gaussian")

obj$start = "gumbel"
expect_equal(obj$start_str, "gumbel")

Try the kdensity package in your browser

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

kdensity documentation built on Oct. 23, 2020, 8:32 p.m.