tests/testthat/test_nudge.R

test_that("TESTING nudge: nudge() only moves probabilities away from 0 or 1", {

    expect_equal(nudge(p = 0), 1e-08)
    expect_equal(nudge(p = 1), 1 - 10^-8)
    expect_equal(nudge(p = 0.5), 0.5)

})

Try the ASAFE package in your browser

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

ASAFE documentation built on Nov. 8, 2020, 10:59 p.m.