R/out.R

Defines functions `%out%`

#' Negation of %in% operator
#'
#' This function checks if elements of a vector are not in another vector.
#'
#' @param x A vector of values to be checked.
#' @param table A vector of values to be compared against.
#' @return A logical vector indicating if the elements of `x` are not in `table`.
#' @export
#' @examples
#' x <- c("A", "B", "C")
#' table <- c("B", "C", "D")
#' x %out% table
`%out%` <- function(x, table) {
  !(x %in% table)
}

Try the twig package in your browser

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

twig documentation built on April 12, 2025, 2:08 a.m.