R/utils.R

Defines functions is_flag

# Internal helpers

# Is `x` a single TRUE or FALSE value?
is_flag <- function(x) {
  is.logical(x) && length(x) == 1 && !is.na(x)
}

Try the SPEI package in your browser

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

SPEI documentation built on Nov. 24, 2026, 1:07 a.m.