shiny_demo: Run a Shiny App from a Package

View source: R/shiny_demo.R

shiny_demoR Documentation

Run a Shiny App from a Package

Description

shiny_demo is a user-friendly interface to running Shiny applications from R packages. For package developers, simply put Shiny apps in the inst/shiny directory in your package. This function will find any apps located there in the installed package.

Usage

shiny_demo(
  topic,
  package = NULL,
  lib.loc = NULL,
  verbose = getOption("verbose"),
  includeAllInstalled = FALSE,
  ...
)

Arguments

topic

the topic/app which should be run.

package

the package which contains the app to run. If NULL the first app with the given topic name will be run.

lib.loc

a character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries.

verbose

a logical. If TRUE, additional diagnostics are printed.

includeAllInstalled

a logical. If TRUE and topic not specified, all Shiny apps from all installed packages will be listed.

...

parameters passed to [shiny::runApp] or to the Shiny app itself.

Author(s)

Jason Bryer (jason@bryer.org)

Examples

## Not run: 
library(ShinyDemo)
shiny_demo() # this should at least return the Shiny apps in this package
shiny_demo(topic = 'df_viewer', package = 'ShinyDemo')

## End(Not run)

jbryer/ShinyDemo documentation built on March 26, 2022, 6:18 p.m.