Skip to contents

`shiny_demo()` is a user-friendly interface to finding and running Shiny applications from R packages. For package developers, simply put Shiny apps in thec`inst/` directory in your package. This function will find any apps located there from loaded package.

Usage

shiny_demo(
  topic,
  package,
  lib.loc = .libPaths(),
  verbose = getOption("verbose"),
  include.installed = FALSE,
  ...
)

# S3 method for class 'shinyapplist'
print(x, ...)

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.

include.installed

search installed packages for Shiny applications. If `FALSE` only loaded packages will be searched.

...

other parameters passed to `print()`.

x

results from [shiny_demo()].

Value

if `topic` is not specified this will return a data frame listing all the Shiny applications found.

Examples

if(interactive()) {
library(ShinyDemo)
shiny_demo() # this should at least return the Shiny apps in this package
shiny_demo(topic = 'df_viewer', package = 'ShinyDemo')
}