R/rstudio.R

Defines functions allow_shiny

Documented in allow_shiny

#' Simple check to determine if code is being run in RStudio with the shiny runtime
#' internal function
#' @keywords internal 

allow_shiny = function() {
  runtime = knitr::opts_knit$get("rmarkdown.runtime")
  
  identical(runtime, "shiny") | is.null(runtime)
}
StatsWithR/statsr documentation built on Jan. 24, 2021, 10:12 a.m.