tests/testthat/test.apa.tstat.r

context("apa.tstat")
library(apaformat)

ts = apa.tstat(0.0342, 36)
expect_equal(ts, "$t$(36) = 0.034")

ts = apa.tstat(c(0.0542, 0.0346), c(20.008, 15))
expect_length(ts, 2)
expect_equal(ts[1], "$t$(20.01) = 0.054")
expect_equal(ts[2], "$t$(15) = 0.035")

ts = apa.tstat(c(0.0542, 0.0346), 19)
expect_length(ts, 2)
expect_equal(ts[1], "$t$(19) = 0.054")
expect_equal(ts[2], "$t$(19) = 0.035")
markanewman/apaformat documentation built on May 10, 2019, 1:19 a.m.