tests/testthat/test-bf_boin_oc.R

test_that("sim.one.trial() works", {
  set.seed(1)
  expect_equal(sim.one.trial(accrual = "poisson")$n,c(19,12,3))
})

test_that("get.oc.bf() works", {
  expect_equal(get.oc.bf(ntrial = 10, seed = 9, accrual = "poisson")$npatients,c('1'=17.6,'2'=16.8,'3'=4.2))
})

Try the bfboin package in your browser

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

bfboin documentation built on Aug. 8, 2025, 6:24 p.m.