Skip to contents

Starts or constructs the interactive Monte Carlo simulation studio bundled in inst/shiny/demo/app.R, demonstrating empirical micro-pilot auto-sizing, non-blocking background MockSlurmBackend cluster execution, surgical chunk retry, live UI responsiveness during heavy compute, and Apptainer/SLURM script export.

Usage

run_demo_app(launch.browser = interactive(), port = NULL, launch = TRUE, ...)

Arguments

launch.browser

Logical; open the app in a web browser when launch = TRUE. Defaults to interactive().

port

Optional TCP port passed to shiny::runApp() when launch = TRUE.

launch

Logical scalar; if TRUE (default), launches the application via shiny::runApp(). If FALSE, constructs and returns the shiny.appobj via shiny::shinyAppDir() without blocking so programmatic callers and automated tests can inspect or start the app cleanly.

...

Additional arguments passed to shiny::runApp() when launch = TRUE.

Value

A shiny.appobj object when launch = FALSE, or invisibly the result of shiny::runApp() when launch = TRUE.

Examples

if (requireNamespace("shiny", quietly = TRUE) &&
    requireNamespace("bslib", quietly = TRUE)) {
  app <- run_demo_app(launch = FALSE)
  inherits(app, "shiny.appobj")
}
#> Loading required package: shiny
#> 
#> Attaching package: ‘bslib’
#> The following object is masked from ‘package:utils’:
#> 
#>     page
#> [1] TRUE
# \donttest{
if (interactive()) {
  run_demo_app()
}
# }