tests/testthat/test-removesp.R

context("Test for .removeSp")

test_that(".removeSp works fine", {
  
  m_test <- rbind(c(1, 5, 0, 5), c(0, 5, 0, 5))
  
  expect_true(all(dim(.removeSp(m_test)) == c(2, 3)))
  
  expect_error(.removeSp(m_test[, -4]))
  
  expect_true(all(dim(.removeSp(m_test[-1, , drop=FALSE])) == c(1, 3)))
  
})

Try the letsR package in your browser

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

letsR documentation built on Jan. 24, 2018, 6:36 p.m.