R/grumpy-package.R

Defines functions `%notin%`

#' @useDynLib grumpy, .registration = TRUE, .fixes = "C_"
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end

## mockable bindings: start
## mockable bindings: end
NULL

# Backport from R 4.4.0
"%||%" <- function(x, y) {
  if (is.null(x)) y else x # nolint: coalesce_linter.
}

# Backport from R 4.6.0
`%notin%` <- function(x, table) {
  match(x, table, nomatch = 0L) == 0L
}

Try the grumpy package in your browser

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

grumpy documentation built on Nov. 16, 2026, 5:07 p.m.