R/utils.R

Defines functions is_empty nlist

is_empty <- function(x) {
  length(x) == 0L
}


#' @importFrom dplyr lst
#' 
nlist <- function(...) {
  x <- dplyr::lst(...)
  if (is_empty(x)) {
    names(x) <- character(0L)
  }
  x
}

Try the tribe package in your browser

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

tribe documentation built on Dec. 1, 2019, 1:24 a.m.