R/utils_logical.R

# logical_ops
# ::rtemis::
# 2023 EDG rtemis.org

#' Inverse of `%in%`
#'
#' data.table %notin% not currently on CRAN version
#'
#' @param x vector
#' @param set vector
#'
#' @return logical vector
#' @keywords internal
#' @noRd
#'
#' @examples
#' \dontrun{
#' 3 %notin% c(2, 4, 6) # TRUE
#' 4 %notin% 3:5 # FALSE
#' }
"%notin%" <- function(x, set) !x %in% set
egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.