Day 20 of 30·Clinical Data Handling & CDISC Basics
The CDISC Model in R: SDTM & ADaM Overview
How the open-source clinical R ecosystem (pharmaverse) maps to CDISC.
Learning objectives
- 1Understand SDTM vs. ADaM roles in an R workflow.
- 2Meet the pharmaverse package family.
- 3See where admiral, metacore, xportr and others fit.
- 4Plan an end-to-end R submission pipeline.
Key SAS® → R comparison
| Task | SAS® | R |
|---|---|---|
| SDTM build | PROC SQL/DATA steps | dplyr + tidyr + admiral helpers |
| ADaM build | macro derivation libraries | admiral |
| Metadata/spec | define.xml tooling | metacore / metatools |
| Transport export | xport engine | xportr |
Code examples
SAS®
/* raw -> SDTM -> ADaM -> TLF
via in-house macro suites */R
# raw -> SDTM: dplyr + admiral
# SDTM -> ADaM: admiral (admiral, admiralonco, ...)
# spec/define: metacore + metatools
# export .xpt: xportr
# TLFs: rtables / tern / gtsummaryNote: pharmaverse is a curated set of interoperable packages covering the full CDISC pipeline.
Explanation
The clinical R ecosystem has matured into pharmaverse — a coordinated family of packages, several industry-sponsored, that cover raw-to-SDTM-to-ADaM-to-TLF. admiral derives ADaM, metacore/metatools manage specifications and define metadata, xportr produces compliant transport files, and rtables/tern/gtsummary build outputs.
Understanding how these pieces connect lets you plan a fully open-source submission pipeline that mirrors your current SAS architecture, which is exactly what the remaining modules build, domain by domain.
Practice exercise
Sketch your current study's SAS pipeline and map each stage (raw cleaning, SDTM, ADaM, define, TLF, export) to its pharmaverse package equivalent, noting any gaps to research.