R/runExample.R

Defines functions runExample

Documented in runExample

#' Run shiny app
#'
#' This function will call shiny app for your use.
#'
#' @import shiny
#' @export
#' @examples
#' \dontrun{
#' library(TestPMD)
#' runExample()
#' }

runExample <- function() {
  appDir <- system.file("shinyEg", "ShinyTestPMD",
                        package = "TestPMD")
  if (appDir == "") {
    stop(paste0("Could not find example directory. ",
                "Try re-installing `TestPMD`."), call. = FALSE)
  }
  # the first app will be called
  shiny::runApp(appDir[1], display.mode = "normal")
}
YunhuiQi/TestPMD documentation built on May 5, 2022, 8:23 p.m.