R/runExample.R

Defines functions runExample

Documented in runExample

#' Run Shiny App demonstrating the package
#'
#' @param ... passed to `shiny::runApp()`, e.g. port, launch.browser
#'
#' @examples
#' if (interactive()) {
#'   bpbounds::runExample()
#' }
#' @export
runExample <- function(...) {
  appDir <- system.file("shiny-examples", "myapp", package = "bpbounds")
  if (appDir == "") {
    stop("Could not find example app.")
  }
  shiny::runApp(appDir, ...)
}

Try the bpbounds package in your browser

Any scripts or data that you put into this service are public.

bpbounds documentation built on Jan. 21, 2020, 5:07 p.m.