run_app: Run the Syrona dashboard

View source: R/app.R

run_appR Documentation

Run the Syrona dashboard

Description

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.

Usage

run_app(data_dir = getwd(), port = NULL, launch.browser = TRUE, ...)

Arguments

data_dir

Path to the directory containing data/sources/ and data/comparisons/. Defaults to the current working directory.

port

Port to run the app on (default: auto-select).

launch.browser

Whether to open a browser window (default: TRUE).

...

Additional arguments passed to runApp.

Value

No return value, called for its side effect of launching the Shiny dashboard.

Examples

# 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)
}

syrona documentation built on Sept. 5, 2026, 1:06 a.m.