tests/testthat/test_rtexp.r

test_that("always above l", {
  set.seed(231234)
  values <- rtexp(n=1000000, rate=0.001, l=500)
  expect_true(all(values > 500))
})

test_that("works if l is not specified", {
  values <- rtexp(n=10000, rate=1.2)
  expect_true(all(values > 0))
})

Try the simDAG package in your browser

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

simDAG documentation built on Jan. 9, 2026, 1:08 a.m.