R/utilities.R

Defines functions rethrow_interrupt force_all

# convenience operator, don't want to import rlang just for this
"%||%" <- function(x, y) {
  if (is.null(x)) {
    y
  } else {
    x
  }
}

# evaluates all arguments
# (simpler than forcing each argument individually)
force_all <- function(...) list(...)

rethrow_interrupt <- function() {
  interrupt <- structure(list(), class = c("interrupt", "condition"))
  signalCondition(interrupt)
  invokeRestart("abort")
}

Try the isoband package in your browser

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

isoband documentation built on Dec. 28, 2022, 2:38 a.m.