R Packages for TLGs in Clinical Research: Tables, Listings, Graphs, and Interactive Reporting
- IDDCR Global Team

- 12 hours ago
- 10 min read
Introduction
In clinical research, data becomes meaningful only when it is transformed into clear, interpretable, and decision-ready outputs. Clinical trial teams collect and process large volumes of data, but the final interpretation often depends on well-designed Tables, Listings, and Graphs, commonly known as TLGs.
TLGs are also referred to as TLFs or TFLs, where “F” stands for Figures. These outputs are central to clinical study reporting, regulatory submission, safety review, efficacy evaluation, and internal decision-making.
In simple terms, TLGs take clinical trial data and convert it into human-interpretable insights. They help clinical teams, statisticians, medical reviewers, sponsors, and regulatory authorities understand what happened during a clinical study.
Today, R is increasingly used to generate clinical trial TLGs because it supports reproducible programming, automation, advanced visualization, and modern reporting workflows. Several R packages are now available to support static tables, listings, figures, interactive applications, and output frameworks.
This article provides an overview of important R packages used for TLG generation in clinical research.
What are TLGs?
TLGs stand for:
Tables
Listings
Graphs
They are the final statistical and clinical outputs generated from clinical trial datasets, usually from ADaM datasets and sometimes from SDTM or derived analysis datasets.
Tables
Tables summarize clinical trial data in a structured format. Examples include:
Demographics and baseline characteristics
Subject disposition
Adverse event summaries
Laboratory summaries
Vital signs summaries
Efficacy endpoint summaries
Concomitant medication summaries
Listings
Listings present subject-level data in detail. Examples include:
Adverse event listings
Serious adverse event listings
Laboratory abnormality listings
Protocol deviation listings
Concomitant medication listings
Subject disposition listings
Graphs
Graphs visually represent clinical trial data. Examples include:
Kaplan-Meier survival curves
Forest plots
Box plots
Line plots
Bar charts
Shift plots
Waterfall plots
Safety trend plots
Static and Interactive TLGs
There are two important stages or categories of TLGs in clinical reporting:
1. Static TLGs
Static TLGs are fixed outputs, usually generated as RTF, PDF, Word, HTML, or other report-ready formats. As of today, static TLGs remain the primary type of evidence submitted to regulatory authorities.
Static TLGs are commonly used in:
Clinical study reports
Regulatory submissions
Safety reports
Interim analysis reports
Data monitoring committee packages
Integrated summaries of safety and efficacy
Publication support
Static outputs must be accurate, reproducible, validated, and aligned with the statistical analysis plan.
2. Interactive TLGs
Interactive TLGs are dynamic outputs, often created using Shiny applications or interactive dashboards. These tools allow users to filter, explore, drill down, and visualize clinical trial data interactively.
Interactive TLGs are commonly used for:
Medical data review
Safety surveillance
Exploratory analysis
Internal decision-making
Clinical data review meetings
Study team dashboards
Risk-based monitoring support
Although interactive TLGs are not usually the primary submission evidence, they are becoming increasingly valuable for internal clinical review and data exploration.
Role of R in TLG Generation
R is well suited for clinical TLG generation because it supports:
Statistical analysis
Data transformation
High-quality graphics
Reproducible reporting
Automated output generation
Interactive applications
Metadata-driven reporting
Flexible table and figure formatting
R packages can help clinical programmers create standard outputs more efficiently while maintaining transparency and reproducibility.
Recommended Reading: Tables in Clinical Trials with R
For clinical trial tables, the R Consortium – Tables in Clinical Trials with R initiative is a useful reference. It compares examples from multiple R table packages and helps programmers understand different approaches to clinical table generation.
This type of resource is especially useful for clinical programmers, statisticians, and students who want to compare how different R packages handle table creation, formatting, and reporting.
R Packages for Clinical Trial Tables
1. rtables
rtables is a framework for declaring complex multi-level tabulations and applying them to clinical trial data.
It is especially useful for generating structured clinical summary tables such as:
Demographics tables
Adverse event tables
Laboratory summary tables
Vital signs tables
Exposure tables
Efficacy summary tables
Key Strengths
Supports complex hierarchical tables
Useful for clinical trial reporting
Allows flexible row and column structures
Supports multi-level summaries
Suitable for regulatory-style outputs
rtables is often used when clinical tables require detailed layout control and complex summary structures.
2. chevron
chevron holds standard TLG template structures to create clinical trial reporting outputs with limited parameterization.
This package is useful when organizations want to standardize commonly used outputs across studies.
Key Strengths
Provides standard table templates
Reduces repetitive programming
Supports consistent reporting formats
Useful for standard safety and efficacy outputs
Helps accelerate TLG production
chevron is particularly helpful for organizations that want reusable templates for clinical trial reporting.
3. pharmaRTF
pharmaRTF is an enhanced RTF wrapper written in R. It can be used with existing R table packages such as huxtable or gt.
RTF remains an important format in clinical reporting because many regulatory and CSR outputs are prepared in RTF or Word-compatible formats.
Key Strengths
Supports RTF output generation
Works with existing table packages
Helps create report-ready clinical outputs
Supports headers, footers, pagination, and formatting
Useful for regulatory-style table production
4. Tplyr
Tplyr is designed to simplify the data manipulation required to create clinical reports.
Clinical tables often require multiple layers of summarization, grouping, counting, percentage calculation, and formatting. Tplyr helps streamline these steps.
Key Strengths
Simplifies clinical summary table creation
Supports counts, percentages, and descriptive statistics
Useful for safety and efficacy summaries
Works well with tidy data workflows
Reduces manual data manipulation
Tplyr is useful for programmers who want a structured way to create clinical tables using R.
5. gtsummary
gtsummary creates publication-ready and clinical-style summary tables from data frames or Analysis Results Dataset structures.
It is widely used for statistical summaries, baseline characteristics, regression summaries, and medical research reporting.
Key Strengths
Easy to create summary tables
Supports descriptive statistics
Supports regression model summaries
Useful for medical publications and clinical reports
Can work with analysis result data structures
gtsummary is particularly useful for quick, clean, and readable clinical summary tables.
6. tfrmt
tfrmt provides a language for defining display-related metadata to automate transformation from Analysis Results Data into formatted tables.
This is important because clinical reporting often separates analysis results from display formatting. tfrmt helps define how results should appear in final outputs.
Key Strengths
Supports metadata-driven table formatting
Helps separate results from display rules
Useful for standardized reporting
Supports automation of formatted tables
Works with analysis results data
7. tfrmtbuilder
tfrmtbuilder is a Shiny application interface for the tfrmt package.
It allows users to interactively build and review table formatting specifications. This can be useful for programmers and reporting teams who want a more visual way to define table layouts.
Key Strengths
Interactive interface for table formatting
Supports tfrmt workflows
Helps users build display specifications
Useful for training and review
Reduces manual formatting effort
8. tidytlg
tidytlg helps generate tables, listings, and graphs using the tidyverse approach.
It is useful for programmers who are already familiar with tidy data principles and want to create clinical outputs using tidy-style workflows.
Key Strengths
Supports tables, listings, and graphs
Uses tidyverse-friendly syntax
Helps generate clinical outputs
Useful for reproducible workflows
Suitable for training and practical implementation
9. eudract
eudract creates safety results summaries in XML format for upload to EudraCT or ClinicalTrials.gov.
This package is useful for clinical trial results disclosure and registry-related safety reporting.
Key Strengths
Supports safety results summary generation
Creates XML output
Useful for EudraCT submissions
Supports ClinicalTrials.gov-related workflows
Helps with structured results reporting
ARD and ARS in Clinical Reporting
What is ARD?
ARD stands for Analysis Results Data. It is an emerging CDISC model for encoding statistical analysis summaries in a machine-readable format.
Instead of only producing human-readable tables, ARD allows analysis results to be stored in a structured format that can be reused, reviewed, and transformed into multiple output types.
What is ARS?
ARS stands for Analysis Results Standard. It is an overarching CDISC framework intended to standardize the specification and representation of analysis results using metadata.
Together, ARD and ARS support the future of metadata-driven clinical reporting.
R Packages for ARD and ARS
1. cards
cards helps construct CDISC Analysis Results Dataset objects.
Key Strengths
Supports ARD object creation
Helps structure analysis results
Useful for metadata-driven reporting
Supports machine-readable summaries
Can support future automation workflows
2. cardx
cardx provides extra Analysis Results Data summary objects supplementary to cards.
Key Strengths
Extends ARD summary capabilities
Supports additional analysis result structures
Works alongside cards
Useful for advanced reporting workflows
3. siera
siera generates analysis results programs using ARS metadata.
Key Strengths
Supports ARS metadata-driven programming
Helps generate analysis programs
Useful for standardized analysis result workflows
Supports automation and reproducibility
R Packages for Clinical Listings
rlistings
rlistings is a framework for creating clinical data listings.
Listings are important because they provide detailed subject-level information. While tables summarize data, listings allow reviewers to inspect individual subject records.
Key Strengths
Supports subject-level listings
Useful for adverse event listings
Useful for lab abnormality listings
Supports clinical data review
Helps create structured listing outputs
Common use cases include:
AE listings
SAE listings
Death listings
Protocol deviation listings
Laboratory listings
Concomitant medication listings
R Packages for Clinical Graphs and Figures
1. ggsurvfit
ggsurvfit simplifies the creation of time-to-event, or survival, summary figures.
Survival analysis is especially important in oncology and other therapeutic areas where endpoints such as overall survival, progression-free survival, and time to event are analyzed.
Key Strengths
Supports Kaplan-Meier plots
Useful for time-to-event analysis
Helps create survival summary figures
Works well with survival analysis workflows
Useful for oncology and long-term outcome studies
2. ggplot2
ggplot2 is a lower-level, non-clinical-specific plotting package, but it is widely accepted as one of the most important graphics packages in R.
It is based on the Grammar of Graphics and is used to create high-quality static plots.
Key Strengths
Highly flexible plotting system
Supports many types of clinical graphs
Widely used across industry and academia
Can create publication-quality figures
Works with many other R packages
Common clinical uses include:
Line plots
Bar charts
Box plots
Scatter plots
Forest plots
Waterfall plots
Laboratory trend plots
Safety visualizations
R Packages for Interactive Clinical Reporting
1. tidyCDISC
tidyCDISC is a Shiny application that helps users create custom tables and figures from ADaM-like datasets.
It is useful for exploratory clinical reporting and interactive review.
Key Strengths
Interactive table and figure generation
Works with analysis-style datasets
Useful for data exploration
Supports clinical review workflows
Helps non-programmers interact with data
2. rhino
rhino supports creating and extending enterprise Shiny applications using best practices.
As Shiny applications become more common in clinical data review and reporting, enterprise-grade development practices become important. rhino helps structure larger Shiny applications in a more maintainable way.
Key Strengths
Supports enterprise Shiny development
Encourages modular app design
Improves maintainability
Useful for production-grade dashboards
Helps teams scale Shiny applications
3. dataviewR
dataviewR is an interactive and feature-rich data viewer.
It helps users explore datasets in an interactive format, which can be useful during clinical data review, quality control, and exploratory analysis.
Key Strengths
Interactive data viewing
Useful for data review
Supports exploratory analysis
Helps inspect clinical datasets
Can support QC and review activities
Framework Packages for TLG Output Production
Some R packages act as frameworks that allow different engines to generate final outputs. For example, they may work with packages such as ggplot2, rtables, plotly, or Tplyr.
These frameworks help standardize the final presentation of tables, listings, and figures.
1. clinify
clinify provides clinical table styling tools and utilities.
Key Strengths
Supports clinical table styling
Helps standardize output appearance
Useful for regulatory-style tables
Provides formatting utilities
Supports consistent reporting presentation
2. gridify
gridify enriches tables and figures with custom headers, footers, and additional layout elements.
Key Strengths
Adds headers and footers
Supports custom output framing
Helps improve presentation quality
Useful for report-ready outputs
Can support standardized layout requirements
3. docorator
docorator is a framework for framing a table, listing, or figure with headers and footers and saving it across multiple file types.
Key Strengths
Supports headers and footers
Works with tables, listings, and figures
Saves outputs across multiple formats
Useful for standardized reporting
Helps automate final output generation
4. autoslider
autoslider supports slide automation for tables, listings, and figures.
This package is useful when clinical outputs need to be placed into presentation slides for internal review meetings, data monitoring committee meetings, or executive summaries.
Key Strengths
Automates slide creation
Supports TLG presentation workflows
Useful for review meetings
Helps reduce manual slide preparation
Supports communication of clinical results
5. tern
tern provides analytical layers ranging from descriptive summaries to more complex statistics on top of foundational table layouts and content controls.
It is useful for clinical trial analysis and reporting where statistical summaries need to be integrated with table structures.
Key Strengths
Supports descriptive and advanced statistics
Works with table layouts
Useful for clinical trial reporting
Helps generate safety and efficacy summaries
Supports statistical content within tables
6. teal
teal is a framework that uses R Shiny to support scalable development of interactive clinical applications.
It is useful for building reusable and modular clinical data review applications.
Key Strengths
Supports interactive clinical data review
Built on Shiny
Helps scale application development
Useful for exploratory analysis
Supports reusable modules and dashboards
TLG Catalogs and Example Applications
For learners and clinical programmers, example catalogs are very helpful because they show how TLG outputs are structured and generated.
Useful resources include:
TLG Catalog
Biomarker Catalog
Teal Gallery
These resources provide practical examples of clinical tables, figures, and interactive applications. They can be useful for training, reference, and implementation planning.
Upcoming R Package: cardinal
cardinal is an upcoming package being developed toward CRAN submission. It is intended to implement table-generating functions for standard FDA safety tables according to published guidelines.
This package may become useful for teams that want to generate standardized safety tables more efficiently.
Potential Benefits
Supports FDA-style safety tables
Helps standardize safety reporting
Reduces manual programming effort
Supports reproducible table generation
Useful for safety analysis workflows
Why TLG Package Knowledge is Important for Clinical Programmers
Clinical programmers and statistical programmers are often responsible for generating final outputs used in clinical study reports, submissions, and internal reviews.
Knowledge of TLG packages helps professionals:
Generate clinical tables efficiently
Create subject-level listings
Build high-quality clinical graphs
Automate reporting workflows
Support reproducible programming
Improve quality control
Prepare regulatory-style outputs
Develop interactive clinical dashboards
Suggested Learning Path for Students
For students and professionals learning R-based clinical reporting, the following learning path can be useful:
Level 1: Foundation
Understand TLGs and their role in clinical research
Learn basic R data manipulation
Learn dplyr, tidyr, and ggplot2
Understand ADaM datasets used for reporting
Level 2: Tables
Learn gtsummary
Learn Tplyr
Learn rtables
Understand table shells and mock shells
Practice demographics, AE, and lab summary tables
Level 3: Listings and Figures
Learn rlistings
Learn ggsurvfit
Practice AE listings and lab listings
Create Kaplan-Meier plots and safety graphs
Level 4: Output Formatting
Learn pharmaRTF
Learn clinify
Learn gridify
Learn docorator
Practice RTF and report-ready output generation
Level 5: Interactive Reporting
Learn Shiny basics
Explore tidyCDISC
Learn teal
Understand enterprise Shiny development with rhino
Level 6: Metadata-Driven Reporting
Understand ARD and ARS concepts
Learn cards
Learn cardx
Explore tfrmt and siera
Career Relevance
R-based TLG generation is becoming an important skill for clinical research professionals. It is useful for roles such as:
Clinical SAS Programmer
R Clinical Programmer
Statistical Programmer
Biostatistician
Clinical Data Scientist
Clinical Trial Data Analyst
Safety Programmer
Regulatory Reporting Programmer
Medical Data Reviewer
Clinical Reporting Specialist
As the industry moves toward automation, reusable programming, and interactive data review, professionals who understand both clinical reporting concepts and R packages will have a strong career advantage.
Conclusion
TLGs are essential outputs in clinical research because they convert clinical trial data into meaningful, human-interpretable insights. Static TLGs remain central to regulatory submission and clinical study reporting, while interactive TLGs are becoming increasingly important for internal review, safety monitoring, and exploratory analysis.
R provides a strong ecosystem for generating tables, listings, graphs, interactive dashboards, and report-ready outputs. Packages such as rtables, chevron, pharmaRTF, Tplyr, gtsummary, tfrmt, tidytlg, rlistings, ggsurvfit, ggplot2, tidyCDISC, rhino, dataviewR, clinify, gridify, docorator, autoslider, tern, and teal support different parts of the TLG workflow.
For clinical programmers, biostatisticians, data scientists, and students, learning these R packages can improve practical readiness for clinical trial reporting, regulatory-style output generation, and modern clinical data review.




Comments