ARS-aligned, spec-driven Tables/Listings/Figures (TLF) automation and traceability engine for clinical reporting in pure R.

ardflow turns a human-readable YAML analysis specification (aligned to CDISC Analysis Results Standard concepts) into computed Analysis Results Data (ARD), formatted tables and figures, regulatory submission outputs (FDA-style RTF and CDISC Dataset-JSON 1.1), and a full traceability trail — end to end.

YAML spec  ->  cards ARD  ->  rtables/tern + ggplot2  ->  RTF + Dataset-JSON + HTML  ->  trace log

Why

The pharmaverse is strong on ADaM ({admiral}) and TLF primitives ({rtables}, {tern}, {r2rtf}); the thinner, fast-moving frontier is ARS-driven automation with traceability and Dataset-JSON output (cf. FDA R Submission Pilot 5). ardflow is a focused, testable take on that gap.

Install

install.packages(
  "https://clincoder.cloud/ardflow/ardflow_0.0.0.9000.tar.gz",
  repos = NULL, type = "source"
)

Quick start

library(ardflow)
spec <- read_spec(system.file("specs", "demographics.yaml", package = "ardflow"))
build_outputs(spec, outdir = "outputs")   # writes RTF + Dataset-JSON + HTML + figures + trace

Datasets resolve from {pharmaverseadam} by name, so it runs with no private data. Supply your own with compute_ard(spec, data = list(adsl = my_adsl)).

Live demo

Rendered outputs (HTML tables, RTF, Dataset-JSON) on the CDISC pilot data: https://clincoder.cloud/ardflow/

Validated by design

  • testthat suite (spec / compute / render / output, incl. Dataset-JSON round-trip).
  • Reproducible: datasets and engine versions stamped into every result’s trace.
  • riskmetric-assessed; environment lock via renv + Docker (rocker/verse) planned.

Roadmap

KM/survival figures · teal review module · riskmetric badge · pkgdown site · GitHub Actions multi-OS CI · ARS JSON import.

License

MIT (c) Bhanoji Duppada