run_shiny_app: This is a wrapper to shiny::runApp to include parameters.

View source: R/run_shiny_app.R

run_shiny_appR Documentation

This is a wrapper to shiny::runApp to include parameters.

Description

This function will run a Shiny app but will pass arbitrary parameters (NAME = VALUE) through the ... parameter to the application. This is done by modifying the global environment. This function will attempt to clean up any objects placed into the global environment on exit. If objects exist prior to calling this function (i.e. exists(OBJECT) returns TRUE) then the value will be reset to it's state prior to calling run_shiny_app.

Usage

run_shiny_app(appDir, ui, server, ...)

Arguments

appDir

the directory of the application to run.

ui

the Shiny ui object.

server

the Shiny server object.

...

[shiny::runApp()] parameters, [shiny::shinyApp()] parameters, or parameters to pass to the Shiny app.

Examples

## Not run: 
run_shiny_app(ui = ShinyDemo::df_viewer_ui,
              server = ShinyDemo::df_viewer_server,
              mtcars = mtcars)

## End(Not run)

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