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
}
paulponcet/tribe documentation built on Nov. 24, 2019, 10:08 p.m.