R/nin.R

Defines functions `%nin%`

#' Simply a negated \code{in} operator.
#'
#' @param x [\code{vector}]\cr
#'   Values that should not be in \code{y}.
#' @param y [\code{vector}]\cr
#'   Values to match against.
#' @usage x \%nin\% y
#' @rdname nin
#' @export
`%nin%` = function(x, y) {
  !match(x, y, nomatch = 0L)
}

Try the BBmisc package in your browser

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

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.