tests/testthat/test-utils.R

context("utils")

test_that("check mode and hpd function",{

  vec = c(1,2,4,4,4,4,4,4,5,7)

  expect_equal(mode_est(vec), 4)
  expect_equal(hpd_est(vec), c(1,7))

})

Try the waspr package in your browser

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

waspr documentation built on Sept. 11, 2023, 5:10 p.m.