R/util.R

Defines functions glubort as_cpp_idx

compact <- function (x) {
  is_null <- map_lgl(x, is.null)
  x[!is_null]
}

glubort <- function(..., .sep = "", .envir = parent.frame()) {
  abort(glue::glue(..., .sep = .sep, .envir = .envir))
}

as_cpp_idx <- function(x) {

  if (is.null(x)) {
    return(x)
  }

  x - 1L
}

Try the rray package in your browser

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

rray documentation built on July 23, 2019, 5:04 p.m.