library(mrmctools)
context("Check CI formulas")
test_that("CI is returned as x100 with 1 decimal place (default rounding)", {
expect_equal(binCI(.23,.1,.4), "23.0 (10.0 to 40.0)")
})
test_that("CI is returned as x100 with 0 decimal places", {
expect_equal(binCI(.23,.1,.4,0,TRUE), "23 (10 to 40)")
})
test_that("CI is returned as entered with 2 decimal places", {
expect_equal(binCI(.23,.1,.4,2,FALSE), "0.23 (0.10 to 0.40)")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.