| run_app | R Documentation |
Launches the Shiny dashboard for exploring prevalence comparisons.
The app looks for data/sources/ and data/comparisons/
relative to your current working directory. Run this from the directory
that contains your data/ folder.
run_app(data_dir = getwd(), port = NULL, launch.browser = TRUE, ...)
data_dir |
Path to the directory containing |
port |
Port to run the app on (default: auto-select). |
launch.browser |
Whether to open a browser window (default: TRUE). |
... |
Additional arguments passed to |
No return value, called for its side effect of launching the Shiny dashboard.
# Copy the bundled demo, generate the comparison, then launch the dashboard.
if (interactive()) {
base <- tempdir()
file.copy(system.file("extdata", "demo", package = "syrona"), base, recursive = TRUE)
dir <- file.path(base, "demo")
old <- options(syrona.data_dir = dir)
compare_all("demo_population", "demo_selected")
run_app(data_dir = dir)
options(old)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.