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)
}

Try the statsr package in your browser

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

statsr documentation built on Jan. 23, 2021, 1:05 a.m.