R/utils.R

Defines functions `%!in%` is_string is_number

is_number <- function(x) is.numeric(x) && length(x) == 1
is_string <- function(x) is.character(x) && length(x) == 1
`%!in%` <- function(x, table) match(x, table, nomatch = 0) == 0  # nolint
CenterOnBudget/Rcbpp documentation built on Jan. 6, 2025, 9:32 p.m.