R/shinydemo.R

Defines functions shinydemo

Documented in shinydemo

#' Launch Shiny demo
#'
#' @param mode Example with \code{"fullpage"} particles and another one with particles inside a \code{"container"}.
#'
#' @export
#' @importFrom shiny runApp
#'
#' @examples
#' if (interactive()) {
#'
#' shinydemo("container")
#'
#' shinydemo("fullpage")
#'
#' }
shinydemo <- function(mode = c("container", "fullpage")) {
  mode <- match.arg(mode)
  shiny::runApp(
    appDir = system.file("shinydemo", mode, package = "particlesjs"),
    display.mode = "showcase"
  )
}
dreamRs/shinyparticles documentation built on Dec. 1, 2019, 5:16 a.m.