tests/testthat/test-frequentdirections.R

context("test-frequentdirections.R")

test_that("all_zero_row_index() works", {
  eps <- 10^(-3)
  x <- matrix(c(1,1,0,10^(-6),2,2), nrow = 3, byrow = TRUE)
  testthat::expect_equal(all_zero_row_index(x, 10^(-3)), 2)
  testthat::expect_equal(all_zero_row_index(x, 10^(-8)), integer(0))
})

Try the frequentdirections package in your browser

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

frequentdirections documentation built on May 2, 2019, 3:27 a.m.