View source: R/run_in_shiny_app.R
| run_in_shiny_app | R Documentation |
Starts a Shiny app in a background process, waits for it
to be ready, executes an arbitrary command via processx::run(),
and stops the app on exit.
run_in_shiny_app(app_expr, port = 9999, timeout = 120, ...)
app_expr |
A character string containing an R expression to launch
the Shiny app, executed via |
port |
HTTP port used by the Shiny app. Default is |
timeout |
Maximum number of seconds to wait for the app to be
ready. Default is |
... |
Arguments passed to |
The value returned by processx::run() (a list with
status, stdout, stderr, timeout).
## Not run:
res <- run_in_shiny_app(
app_expr = "shiny::runApp('app/', port = 9999)",
command = "npm", args = c("run", "scenario", "import-flow"),
wd = tempdir()
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.