tests/testthat/test_bin.R

test_that("Check output properties", {
  
  skip_on_cran()
  skip_on_bioc()
  
  x = rnorm(20)
  res = bin(x, seq(min(x), max(x), length = 5))
  
  expect_equal(ncol(res), 3)
  expect_equal(sum(res[, 3]), 20)
  expect_equal(class(res), c('matrix', 'array'))
})

Try the mixR package in your browser

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

mixR documentation built on June 1, 2021, 5:07 p.m.