R/utils.R

Defines functions is.reactive

is.reactive <- function(obj){
  all(class(obj) %in% c("reactiveExpr","reactive"))
}


`%||%` <- function (x, y)
{
  if (is.empty(x))
    return(y)
  else if (is.null(x) || is.na(x))
    return(y)
  else if (class(x) == "character" && nchar(x) == 0)
    return(y)
  else x
}

is.empty <- function (x)
{
  !as.logical(length(x))
}

Try the shinypanels package in your browser

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

shinypanels documentation built on Jan. 26, 2020, 5:06 p.m.