tests/testthat/test_sprt.R

library(testthat)

test_that("SPRT returns decision", {
  x <- c(0,0,1,0,1,1,1,0,0,1,0,0)
  res <- sprt(x, alpha = 0.05, beta = 0.1, p0 = 0.1, p1 = 0.3)
  expect_true("decision" %in% names(res))
})
devtools::build()       # creates tar.gz
devtools::check()       # runs local checks

Try the SPRT package in your browser

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

SPRT documentation built on Sept. 15, 2025, 9:08 a.m.