R/launch_app.R

#' Launch Shiny app.
#' @param appname String name of app
#' @param ... list of dfs or matrix
#' @return shiny application
#' @importFrom shiny runApp
#' @importFrom rlang quo
#' @examples
#'\dontrun{launch_app(ImportData)}
#' @export
launch_app <- function(appname, ...) {
  appDir = system.file(paste0("inst/example_app/", deparse(substitute(appname))),
    package = "newsExplorer")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `newsExplorer`.",
      call. = FALSE)
  }
  shiny::runApp(appDir, ...)
}
data-atelier/newsExploreR documentation built on May 22, 2019, 11:51 p.m.