tests/testthat/test-prob.odd.R

context("prob.odd")

test_that("prob.odd outputs correctly", {
    probs <- 0.5
    expect_true(prob.odd(probs) == 1)
    probs <- c(0.5, 0.25)
    expect_true(identical(prob.odd(probs), c(1, 1/3)))
}) 

Try the optiRum package in your browser

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

optiRum documentation built on May 5, 2022, 1:05 a.m.