R/run_shiny.r

Defines functions run_shiny

Documented in run_shiny

#' Run Shiny Application Demo
#' 
#' Function runs Shiny Application Demo
#' 
#' This function does not take any arguments and will run the Shiny Application.
#' If running from RStudio, will open the application in the viewer, otherwise will
#' use the default internet browser.
#' 
#' @export
run_shiny <- function() {
  appDir <- system.file("shiny", package = "SPSStoR")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `SPSStoR`.", call. = FALSE)
  }
  
  shiny::runApp(appDir, display.mode = "normal")
}
lebebr01/SPSStoR documentation built on Nov. 21, 2019, 9:45 p.m.