R/launch_app.R

Defines functions launch_app

Documented in launch_app

#' Launch the dashboard for Vietnam Covid-19
#' 
#' @description this function will launch the shiny app dashboard that was embedded in the package.
#' After you installed the package, simply load the package and type the command launch_app() in the console.
#' 
#' @export

launch_app <- function() {
  appDir <- system.file("vietnam_covid", package = "vietnamcovid19")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `vietnamcovid19`.", call. = FALSE)
  }
  
  shiny::runApp(appDir, display.mode = "normal")
}
etc5523-2020/r-package-assessment-HanseNgo305 documentation built on Jan. 1, 2021, 1:10 a.m.