tplyr2: A Grammar of Clinical Summary Tables

Implements a grammar of summary data for clinical reports. Clinical summary tables are decomposed into modular layers, each representing an independent summary block. Supports count, descriptive statistics, and shift layer types with a declarative spec-based API built on data.table for performance.

Version: 0.2.0
Depends: R (≥ 4.1.0)
Imports: data.table, jsonlite, purrr, rlang, stringr
Suggests: testthat (≥ 3.0.0), withr, yaml, knitr, rmarkdown
Published: 2026-08-08
DOI: 10.32614/CRAN.package.tplyr2 (may not be active yet)
Author: Mike Stackhouse [aut, cre]
Maintainer: Mike Stackhouse <mike.stackhouse at atorusresearch.com>
BugReports: https://github.com/atorus-research/tplyr2/issues
License: MIT + file LICENSE
URL: https://github.com/atorus-research/tplyr2, https://atorus-research.github.io/tplyr2/
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: tplyr2 results

Documentation:

Reference manual: tplyr2.html , tplyr2.pdf
Vignettes: Building an Adverse Events Table (source, R code)
Custom Analysis Layers (source, R code)
Analysis Results Data (source, R code)
Comparative Statistics and Binding External Results (source, R code)
Count Layers (source, R code)
Denominators (source, R code)
Descriptive Statistics Layers (source, R code)
Clinical Display Conventions (source, R code)
Format Strings (source, R code)
Metadata and Traceability (source, R code)
Migrating from Tplyr v1 (source, R code)
tplyr2 Options (source, R code)
Post-Processing (source, R code)
Precision and Alignment (source, R code)
Risk Difference (source, R code)
Spec Serialization (source, R code)
Shift Layers (source, R code)
Sorting a tplyr2 Table (source, R code)
Table Properties (source, R code)
Getting Started with tplyr2 (source, R code)

Downloads:

Package source: tplyr2_0.2.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): tplyr2_0.2.0.tgz, r-oldrel (arm64): tplyr2_0.2.0.tgz, r-release (x86_64): tplyr2_0.2.0.tgz, r-oldrel (x86_64): tplyr2_0.2.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=tplyr2 to link to this page.