R/utils.R

Defines functions `%||%` null_or_any_na drop_last

`%||%` <- function(l, r) {
  if (is.null(l)) r else l
}

null_or_any_na <- function(x) {
  is.null(x) || any(is.na(x))
}

#' @importFrom utils head

drop_last <- function(x) {
  head(x, length(x) - 1)
}

Try the sankey package in your browser

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

sankey documentation built on May 2, 2019, 11:07 a.m.