tests/testthat/test_aah.R

test_that("Test suite aah.R; rgivenshape()", {

  `checker` <- function(x,s) {

      expect_false(any(is.id(x)))
      expect_true(all(sapply(shape(x, drop = FALSE),function(x){all(sort(x) == sort(s))})))
  }

  for (i in 1:5) {
      s <- 2:4
      checker(rgivenshape(10,s),s)
      checker(rgivenshape(s),s)
  }

  
  
})

Try the permutations package in your browser

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

permutations documentation built on April 3, 2025, 7:09 p.m.