Local Shiny app for building submission-ready clinical Tables, Figures & Listings (TFLs) from ADaM data. Point-and-click interface that generates reproducible R scripts using arframe as the rendering engine.
No server infrastructure needed — runs entirely on your laptop.
git clone git@github.com:vthanik/loom.git
cd loom
Rscript -e "shiny::runApp('.')"- R >= 4.1.0
- arframe — rendering engine (install from GitHub)
# Install arframe first
remotes::install_github("vthanik/arframe")
# Install CRAN dependencies
install.packages(c(
"shiny", "bslib", "htmltools", "dplyr", "tidyr",
"tibble", "readr", "glue", "reactable", "rlang"
))remotes::install_github("vthanik/loom")
loom::launch()- Load Data — select ADaM datasets (CDISC pilot data bundled) or upload your own (.rds, .csv)
- Select Template — choose Demographics (more templates coming)
- Configure Analysis — treatment variable, group variable, per-variable statistics
- Format Output — titles, footnotes, columns, headers, page layout, rules
- Generate Preview — Ctrl+Enter renders the table instantly
- Export — download RTF/PDF/HTML + standalone R script
10 CDISC pilot datasets from pharmaverseadam:
| Dataset | Rows | Description |
|---|---|---|
| ADSL | 306 | Subject-level demographics |
| ADAE | 1,191 | Adverse events |
| ADCM | 7,510 | Concomitant medications |
| ADEX | 6,315 | Exposure |
| ADLB | 83,652 | Laboratory results |
| ADMH | 1,818 | Medical history |
| ADRS | 3,694 | Tumor response |
| ADTR | 181 | Tumor results |
| ADTTE | 512 | Time-to-event |
| ADVS | 65,032 | Vital signs |
| Shortcut | Action |
|---|---|
| Ctrl+1-5 | Switch tabs (Data/Template/Analysis/Format/Output) |
| Ctrl+Enter | Generate preview |
| Ctrl+S | Export RTF |
| Ctrl+Shift+S | Download R script |
| Ctrl+B | Toggle sidebar |
ADaM Data → ARD (wide) → arframe spec → RTF/PDF/HTML
↓
R script (reproducible)
- arframe = rendering engine (pure R, no UI)
- loom = this app (Shiny UI that drives arframe)
- Generated R scripts are standalone — run anywhere with
dplyr+arframe
R/
app_ui.R / app_server.R # Shiny app shell
mod_*.R # UI modules (data, template, analysis, format, output)
fct_ard_demog.R # Demographics ARD builder
fct_render.R # arframe rendering (consumes IR)
fct_codegen.R # R script generator (consumes IR)
fct_spec_ir.R # Shared intermediate representation
spec_demog.R # Demographics template defaults
inst/
app/www/ # CSS, JS, highlight.js
data/ # Bundled CDISC pilot datasets (.rds)
tests/
testthat/ # 57+ regression tests
If behind a firewall for first-time package installs:
Sys.setenv(http_proxy = "http://proxy:port", https_proxy = "http://proxy:port")MIT