R/utils.R

Defines functions is_lang call_env is_vector

is_lang <- function(x) identical(typeof(x), "language")

call_env <- function(n = 1) parent.frame(n + 1)

is_vector <- function(x) {
  if (is.atomic(x) || is.list(x) || is.call(x)) {
    return(TRUE)
  }
  FALSE
}

"%||%" <- function(a, b) if (is.null(a)) b else a

Try the dapr package in your browser

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

dapr documentation built on May 7, 2019, 1:01 a.m.