R/validation.R

Defines functions is_between

is_between <- function(x, a, b, inclusive = FALSE) {
  lt <- if (inclusive) `<=` else `<`
  stopifnot(lt(a, x) && lt(x, b))
  invisible(TRUE)
}
kenjisato/macromodels documentation built on May 5, 2019, 6:59 p.m.