tests/testthat/test-posthocPairwiseT.R

dataset <- data.frame(
  outcome = c( 1,2,3, 2,3,4, 5,6,7 ),
  group = factor(c( "a","a","a", "b","b","b","c","c","c"))
)
anova1 <- aov(outcome ~ group, data = dataset)

test_that("posthocPairwiseT example works", {

  expect_equal(
    posthocPairwiseT(anova1),
    with(dataset, pairwise.t.test(outcome, group))
  )
})

Try the lsr package in your browser

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

lsr documentation built on Dec. 11, 2021, 9:10 a.m.