This is a wrapper to shiny::runApp to include parameters.
Source:R/runAppWithParams.R
runAppWithParams.Rd
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 Shiny UI and server function environments.
This function will traverse up the environment tree looking for the given parameter. Optionally, if `type_check` is set to an `is.` type function (e.g. `is.numeric`, `is.list`, etc.) it will check the object type. If the object is not found or the type doesn't match it will throw an error.
Examples
if (interactive()) { # Only run this example in interactive R sessions
library(ShinyDemo)
data(mtcars)
data(faithful)
runAppWithParams(ui = ShinyDemo::df_viewer_ui,
server = ShinyDemo::df_viewer_server,
data_frames = list(mtcars = mtcars, faithful = faithful),
port = 2112)
}