tests/testthat/helper_functions.R

# Used to check that x is a vector in which x[i+1] >= x[i] for all i.
expect_nondecreasing <- function(x, tolerance, scale){
  expect_equal(diff(x) >= 0,rep(TRUE,length(x) - 1), tolerance = tolerance, scale = scale)
}
  
stephenslab/mr.mash.alpha documentation built on Feb. 7, 2025, 10:06 p.m.