tests/testthat/test_checkPval.R

test_that("Check error messages", {
    expect_warning(checkPval(c(0.1,NA)), "Missing p-values were ignored")
    
    expect_error(checkPval(c(0.1,'A')),
                 "The vector of p-values contain at least one non-numeric element.")
    
    expect_error(checkPval(c(0.1,2)), "All p-values must be between 0 and 1.")
})

Try the onlineFDR package in your browser

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

onlineFDR documentation built on Nov. 8, 2020, 6:35 p.m.