R/RunExample.R

#' RunExample
#'
#' This function will run the shiny app found in this package.
#'
#' @name RunExample
#' @return launches the shiny app created for the package.
#' @import plyr shiny shinythemes
#' @export
#' @examples
#' \dontrun{
#' kgc::RunExample()
#' }
RunExample <- function() {
  appDir <- system.file("shiny-examples", "kgcshiny", package = "kgc")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing kgc.", call. = FALSE)
  }
  
  shiny::runApp(appDir, display.mode = "normal")
}

Try the kgc package in your browser

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

kgc documentation built on May 2, 2019, 1:47 p.m.