compare_all: Run the full comparison pipeline for two datasets across...

View source: R/compare.R

compare_allR Documentation

Run the full comparison pipeline for two datasets across available domains.

Description

Loads both datasets, runs the 4-step comparison for each domain present in both, and optionally saves to CSV.

Usage

compare_all(
  d1_name,
  d2_name,
  domains = c("conditions", "procedures", "drugs"),
  save = TRUE
)

Arguments

d1_name

Name of dataset 1 (reference).

d2_name

Name of dataset 2 (comparison).

domains

Character vector of domains to compare.

save

If TRUE (default), writes CSV output.

Value

Named list of domain results (invisible).

Examples


# Run the bundled demo (a curated 32-concept subset) end to end.
# Copy it to a writable folder first, since the installed copy is read-only.
base <- tempdir()
file.copy(system.file("extdata", "demo", package = "syrona"),
          base, recursive = TRUE)
dir <- file.path(base, "demo")
old <- options(syrona.data_dir = dir)
# One domain keeps the example quick; drop `domains` to compare all three.
res <- compare_all("demo_population", "demo_selected", domains = "conditions")
res$condition_meta_summary
options(old)
# Then explore interactively: run_app(data_dir = dir)


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