R/utils.R

Defines functions list1 dropNulls

dropNulls <- function(x) {
  x[!vapply(x, is.null, FUN.VALUE = logical(1))]
}

list1 <- function(x) {
  if (length(x) == 1) {
    list(x)
  } else {
    x
  }
}
zehndert/shinytreeviewCustom documentation built on Dec. 23, 2021, 9:15 p.m.