Tao Xiang
2026-01-23
Background and Introduction
App Development and how to use
Live Demo and Discussion
“Clinical Report with R” is on of workshop I made in summer of 2024. The core is developing TFL workflow in R, which is a migration from our SAS workflow to R. However, comparing with common programming method to generate TFL, more efficient, automatical visualization tool is desired by our department. So, I turned to another powerful solution, R Shiny.
Shiny is an R package that makes it easy to build interactive web applications (apps) straight from R without any frontend knowledge(HTML, CSS, or JavaScript).
Replace SAS/Viya VA/JMP?
Give a nice appearance to SAS macros?
Compete with other tools?
Nah
Improve Efficiency
Standardized Workflow
For the whole team
Reproducibility and Traceability
Low cost of app development
teal?A RShiny-based interactive data exploration framework
Modularized and standardized building blocks
Collection of specialized R packages
Streamlines creation of web-apps that offers:
teal product mapteal?Spending months on diving into open-source solutions to statistical analysis. I picked teal for app development baseline framework for the rest but not least reasons:
teal is an interactive data exploration framework based on shiny, designed primarily to analyze CDISC clinical trial data
teal framework provides application developers with a wide range of customizable standard analysis modules
No need to spending a lot of time on UI/UX matters (Bootstrap V5 themes since teal v1.0.0)
Built by renowned Roche NEST project team, accepted and collaborated with multiple big pharma. (Sustained development)
Rich source of help documents and examples.
Rich source of help documents and examples, which also brought steep learning curve and burdens.
Lack of Shiny basic knowledges.
Reproducible R environment and continuous integration.
AI performed not ideally in solving teal development problems.
| Roles | Primary Responsibility |
|---|---|
teal app user |
Use app to product statistical reports, all faculty in BIOS. R knowledge is not required. |
teal app developer |
Create app from built functions from teal ecosystem. Need intermediate R skills like Basic, tidyverse, Shiny, functional programming. Have to learn teal framework with bunch of resources. |
teal module developer |
Create customized modules on internal analysis purpose. Need a little advanced R knowledge. Understand reactive programming in Shiny, meta-programming for source development, familiar with table-grammar R packages like rtables, draw complicated plots with ggplot2, rendering engine R packages for output, so and so forth. |
teal framework developer |
Roche NEST project team and collaborators from other open-source developing team. Create and maintain this frameworks by those SDEs and data scientists. |
teal4dvteal4dv is the given name for this shiny app, created and modified from teal ecosystem designed and open sourced by Roche NEST Project. This app is developed for internal use by Innocare Biostat team, applied for statistical monitor and data visualization purpose.
This app (teal4dv v0.0.0.9000) is created for local use at beginning. We will figure out server deployment strategy in future.
It was created via usethis::create_package() to make this app a r-package like structure. App version is recorded in DESCRIPTION file.
teal4dv/
├── data/
│ ├── adae.sas7bdat
│ ├── adlb.sas7bdat
│ ├── adrs.sas7bdat
│ ├── adsl.sas7bdat
│ ├── adtr.sas7bdat
│ ├── adtte.sas7bdat
├── R/
│ ├── table_with_setting_mod.R
│ ├── tm_gmod_boxplot.R
│ ├── tm_gmod_kmplot.R
│ ├── tm_gmod_spider.R
│ ├── tm_gmod_swim.R
│ ├── tm_gmod_waterfall.R
│ ├── tm_tmod_aesocpt_grade.R
│ ├── tm_tmod_aesocpt.R
│ ├── tm_tmod_aesum.R
│ ├── tm_tmod_summary_bds.R
│ ├── tm_tmod_summary.R
│ ├── utils.R
├── renv/
│ ├── .gitignore
│ ├── activate.R
│ └── settings.json
├── app.R
├── DESCRIPTION
├── renv.lock
└── teal4dv.Rproj
Require R >= 4.4.1
The renv package helps create reproducible environments for this project and make this app more isolated, portable and reproducible.
Make sure you have installed renv first:
Project Environment was isolated and reproducible via renv. Restore the enviroment for package dependencies each time when version is bumped.
Run App via:
Based on analysis ready source data - ADaM.
Accuracy and efficiency first.
No coding for users. Meet analysis requirement in ADaM procedures not in Shiny Server back-end.
The output format is Shell. So, no need to draw shell for existing modules.
Find balance between internal customized format/rules and app performance. (Discuss in demo)
Not able to follow internal standard format completely.
Customized modules are limited in starting stage.
Lack of support for RTF output format
Table output relies on rtables ecosystem.
Testing and Bug fixed
Validating existing modules compare with SAS
Training
Continuously develop essential modules (Efficacy summary tables for Response/Time-to-event endpoints, line plot for average change from baseline)
More customized modules or use validated teal.module.clinical & teal.module.general modules for internal outputs.
Break the limitation of table grammar with rtables (like gtsummary, tplyr)
More customized functions for output enhancement.

