R/launch_app.R

Defines functions launch_app

Documented in launch_app

#' Load Shiny Application from inst/app directory
#'
#'
#' @return
#' A Shiny App embedded in the package
#'
#'
#' @export

launch_app <- function() {
  # Locates all the app that exists in covid19usa package
  appDir <- system.file("app", package = "covid19usa")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `covid19usa`.", call. = FALSE)
  }

  shiny::runApp(appDir, display.mode = "normal")
}
etc5523-2020/r-package-assessment-BrendiA documentation built on Jan. 1, 2021, 1:10 a.m.