Learn R Programming

Automated, Reproducible Generation of Results Tables: Bridging the Rift Between Epidemiologists and Their Data

Tables are the key format in which epidemiologists present their results. Many results tables in applied studies merely show point estimates and confidence intervals, or even p-values, from regression models: a “growing rift between epidemiologists and their data” (Rothman 2017). “Actual,” descriptive data, such as counts stratified by exposure and a main confounder or effect modifier, are often lacking.

rifttable creates presentation-ready results tables for epidemiologists in an automated, reproducible fashion. The user provides the final analytical dataset and specifies the design of the table, with rows and/or columns defined by exposure(s), effect modifier(s), and estimands as desired, allowing to show descriptors and inferential estimates in one table – bridging the rift between epidemiologists and their data, one table at a time.

Installation

The rifttable package can be installed from CRAN:

install.packages("rifttable")

Development versions can be installed from GitHub using:

remotes::install_github("stopsack/rifttable")

The latter installation procedure requires the remotes package, obtainable via install.packages("remotes").

Example

library(rifttable)

example_design <- tibble::tribble(
  ~label,                       ~type,                   ~stratum,
  "Overall",                    "",                      "",
  "– Deaths/N",                 "outcomes/total",        c("Low", "High"),
  "– Risk",                     "risk",                  c("Low", "High"),
  "– Risk ratio (95% CI)",      "rr",                    c("Low", "High"),
  "– Risk difference (95% CI)", "rd",                    c("Low", "High"),
  "",                           "",                      "",
  "Low hormone receptor",       "",                      "",
  "– Deaths/N (Risk)",          "outcomes/total (risk)", "Low",
  "– Risk difference (95% CI)", "rd",                    "Low",
  "High hormone receptor",      "",                      "",
  "– Deaths/N (Risk)",          "outcomes/total (risk)", "High",
  "– Risk difference (95% CI)", "rd",                    "High"
) |> 
  dplyr::mutate(
    exposure = "stage",
    outcome = "death",
    effect_modifier = "receptor"
  )

rifttable(
  design = example_design,
  data = risks::breastcancer
)
StageStage IStage IIStage III
Overall
– Deaths/N7/6726/9621/29
– Risk0.100.270.72
– Risk ratio (95% CI)1 (reference)2.59 (1.20, 5.6)6.9 (3.3, 14)
– Risk difference (95% CI)0 (reference)0.17 (0.05, 0.28)0.62 (0.44, 0.80)
Low hormone receptor
– Deaths/N (Risk)2/12 (0.17)9/22 (0.41)12/14 (0.86)
– Risk difference (95% CI)0 (reference)0.24 (-0.05, 0.54)0.69 (0.41, 0.97)
High hormone receptor
– Deaths/N (Risk)5/55 (0.09)17/74 (0.23)9/15 (0.60)
– Risk difference (95% CI)0 (reference)0.14 (0.02, 0.26)0.51 (0.25, 0.77)

For more examples, see the Get Started vignette.

Copy Link

Version

Install

install.packages('rifttable')

Monthly Downloads

510

Version

0.7.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Konrad Stopsack

Last Published

January 18th, 2026

Functions in rifttable (0.7.2)

table1_design

Design A Descriptive Table
rt_gt

Turn tibble into gt Table with Custom Formatting
scoreci

Wilson Score Confidence Intervals
survdiff_ci

Estimate Difference in Survival or Cumulative Incidence and Confidence Interval
rifttable

Results Tables for Epidemiology