tests/testthat/test_bh_threshold.R

test_that("applying BH via p.adjust or get_bh_threshold should yield the same result",{
	set.seed(1)
	pv <- c(runif(10000),rbeta(2000,.5,7))
	expect_equal(sum(p.adjust(pv, method="BH") <= 0.01), sum(pv <= get_bh_threshold(pv, 0.01)))
})

Try the IHW package in your browser

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

IHW documentation built on Nov. 8, 2020, 7:44 p.m.