tests/testthat/test_r_ci.R

library(apaTables)
context("r calculation")
test_that("Test r calculation and CI", {
     expect_equal(cor_test1()$r,".83**")
     expect_equal(cor_test1()$CI,"[.66, .91]")
     expect_equal(cor_test1()$m,"64.63")
     expect_equal(cor_test1()$sd,"12.17")
})

Try the apaTables package in your browser

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

apaTables documentation built on Jan. 13, 2021, 11:22 p.m.