tests/testthat/test-thresh.R

test_that("Check for threshold not > max of data", {

  counts = matrix(rpois(1440*5, lambda = 5), ncol = 1440)
  wear = c(rep(0,300),rep(1,1020),rep(0,120))
  max_counts = max(counts)
  expect_error(fragmentation(counts, wear, thresh = max_counts + 1,bout.length = 1, metrics = "mean_bout"))

})

Try the ActFrag package in your browser

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

ActFrag documentation built on March 26, 2020, 7:14 p.m.