tests/testthat/test-truncated.R

context(".rtrunc(): truncated distributions function")

test_that("truncated distributions work", {
  set.seed(101)
  x <- .rtrunc(1000, spec = "norm", a = 0)
  expect_true(min(x) > 0)
  expect_identical(.qtrunc(0.5, spec = "norm"), 0)
})

Try the PAsso package in your browser

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

PAsso documentation built on June 18, 2021, 5:09 p.m.