R/between.R

Defines functions between

Documented in between

between <- function(y, x1, x2){
  y <- unclass(y)
  x1 <- unclass(x1)
  x2 <- unclass(x2)
  small <- pmin(x1, x2)
  large <- pmax(x1, x2)
  (y >= small) & (y <= large)
}

Try the tis package in your browser

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

tis documentation built on Sept. 29, 2021, 1:06 a.m.