The rtables Demographic Table: Build Table 1 in R Two Ways
A complete, runnable tutorial for the clinical demographic table (Table 1, the CSR’s Table 14-1.01). Learn what a demographic table is (rows = baseline characteristics such…
Generate the tables, listings, and figures (TLFs) that report a clinical trial — in R, from analysis-ready ADaM data. This hands-on series builds submission-grade outputs with the pharmaverse reporting stack (gtsummary, rtables, tern), starting from the demographic table that opens every clinical study report — each a complete, runnable build on public pharmaverse data.
Learn › Pharma & Clinical › TLF Generation
ADaM (the Analysis Data Model) makes the data analysis-ready; TLFs — tables, listings, and figures — are what a trial actually reports. This series generates submission-grade TLFs in R from ADaM datasets with the pharmaverse reporting stack: gtsummary for fast exploration, rtables and tern for the validated, RTF-able outputs that go into a clinical study report. Each lesson is a complete, runnable build on public pharmaverse data, so every number reproduces. The runtime is the judge.
The series builds the core TLFs every clinical study report carries:
gtsummary path for exploration, and the submission-grade rtables/tern path for the validated output — the same numbers, different machinery, and when to reach for each.tern’s summarize_ancova().rtables/tern.survminer from an ADTTE.survminer’s ggforest(), and the subgroup forest built with ggplot2, from the same ADTTE.rlistings (key-column blanking, pagination) and export the submission RTF with r2rtf.cards and cardx, so every number is a row you can table, plot, or re-use — then lay it out with gtsummary::tbl_ard_summary().These build the TLF backbone of a submission; validation & QC — double programming and defensive checks — come next.
Ask Prova “how do I build a submission-grade demographic table in rtables, and when should I reach for tern’s analyze_vars instead of gtsummary?” — it answers grounded in the CDISC reporting conventions and runnable rtables/tern code, so the table fits your study, not a generic example. The runtime is the judge. Ask Prova →
Prove you can do it. Master the whole Clinical Programming in R (pharmaverse) series — track your path, build projects, and earn a certificate.
Go Pro — unlimited Prova on your own data and a verifiable certificate that proves the skill.
from $15/mo billed yearly
✓ You're Pro — keep going. The runtime is the judge.
Get new R & Python lessons by email
Practical, reproducible, no spam. Unsubscribe anytime.
Double opt-in. We never share your email.
@online{untitled,
author = {},
title = {TLF {Generation}},
url = {https://www.datanovia.com/learn/pharma-clinical/04-tlf-generation/},
langid = {en}
}