tests/testthat/test-createSaturated.R

test_that("createSaturated", {
  temp <- createSaturated(2, 2)
  expect_equal(dim(temp), c(4,3))
  temp <- createSaturated(2, 4)
  expect_equal(dim(temp), c(16,15))
  temp <- createSaturated(3, 5)
  expect_equal(dim(temp), c(243, (3^5-1)/2))
  temp <- createSaturated(4, 3)
  expect_equal(dim(temp), c(64, (4^3-1)/3))
  expect_error(createSaturated(6,2))
})

Try the SOAs package in your browser

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

SOAs documentation built on Aug. 11, 2023, 1:09 a.m.