From e1fd12e0f072a06dc245beee3dd064568ef7981c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 21:24:57 +0000 Subject: [PATCH 01/23] Initial plan From d37c6e2b55e1a0a548800f96b8f9cfd00c6e8b91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 21:28:33 +0000 Subject: [PATCH 02/23] Add comprehensive landing pages for all sections Co-authored-by: jeffreyad <112705781+jeffreyad@users.noreply.github.com> --- adam/index.qmd | 48 +++++++++++++++++++++++++++++++++++++ digit_files/index.qmd | 40 +++++++++++++++++++++++++++++++ esub/index.qmd | 56 +++++++++++++++++++++++++++++++++++++++++++ interactive/index.qmd | 41 +++++++++++++++++++++++++++++++ logging/index.qmd | 46 +++++++++++++++++++++++++++++++++++ sdtm/index.qmd | 33 +++++++++++++++++++++++++ tlg/index.qmd | 45 ++++++++++++++++++++++++++++++++++ 7 files changed, 309 insertions(+) diff --git a/adam/index.qmd b/adam/index.qmd index 9489b895..3fc3993b 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -1,3 +1,51 @@ --- title: "ADaM" --- + +## Overview + +This section provides end-to-end examples for creating Analysis Data Model (ADaM) datasets using pharmaverse packages. ADaM is a CDISC standard designed to facilitate efficient generation, replication, and review of clinical trial statistical analyses. + +The examples demonstrate how to leverage multiple pharmaverse packages together, including `{admiral}`, `{metacore}`, `{metatools}`, and `{xportr}`, to build analysis-ready datasets from SDTM data. + +## Examples + +The following ADaM dataset examples are available: + +### Subject-Level Analysis Dataset + +- **[ADSL (Subject-Level Analysis Dataset)](adsl.qmd)** - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. + +### Basic Data Structure (BDS) Analysis Datasets + +- **[ADAE (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. +- **[ADVS (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. +- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for efficacy endpoints. + +### Time-to-Event Analysis Dataset + +- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop time-to-event analysis dataset for survival analyses. + +### Pharmacokinetic Analysis Datasets + +- **[ADPC (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset. +- **[ADPPK (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset. + +## Key Packages Used + +- **[`{admiral}`](https://pharmaverse.github.io/admiral/)** - Core ADaM derivations and functions +- **[`{metacore}`](https://atorus-research.github.io/metacore/)** - Metadata and specifications management +- **[`{metatools}`](https://pharmaverse.github.io/metatools/)** - Dataset building and validation using metadata +- **[`{xportr}`](https://atorus-research.github.io/xportr/)** - SAS transport file creation and eSub checks + +## Getting Started + +Each example demonstrates: + +- Data input from SDTM datasets +- Derivation of analysis variables +- Application of metadata specifications +- Dataset validation and checks +- Export to SAS transport format + +We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. diff --git a/digit_files/index.qmd b/digit_files/index.qmd index 1c01c7e5..79e30399 100644 --- a/digit_files/index.qmd +++ b/digit_files/index.qmd @@ -1,3 +1,43 @@ --- title: "Documents" --- + +## Overview + +This section contains examples for generating various document outputs from clinical trial data using pharmaverse packages. These examples demonstrate how to create professional reports, presentations, and other document formats commonly used in pharmaceutical research and regulatory submissions. + +The examples leverage R's document generation capabilities combined with pharmaverse tools to automate the creation of formatted outputs. + +## Examples + +The following document generation examples are available: + +### Word Documents + +- **[DOCX Output](docx.qmd)** - Learn how to generate Microsoft Word documents from R, including tables, listings, and formatted text. This is particularly useful for creating clinical study reports and documentation that require Word format. + +### PowerPoint Presentations + +- **[Auto Slider](autoslider.qmd)** - Create automated PowerPoint presentations with clinical trial outputs. This example demonstrates how to programmatically generate slides containing tables, figures, and analysis results, streamlining the creation of study presentations and data review meetings. + +## Use Cases + +These document generation capabilities are valuable for: + +- Clinical study reports (CSRs) +- Statistical analysis plans (SAPs) +- Data review meetings +- Regulatory submission documents +- Study team presentations +- Internal stakeholder communications + +## Getting Started + +Each example demonstrates: + +- Setting up document templates +- Populating documents with analysis results +- Formatting and styling outputs +- Automating repetitive document creation tasks + +These tools can significantly reduce the time and effort required to produce professional documentation from your clinical trial analyses. diff --git a/esub/index.qmd b/esub/index.qmd index c5e7c163..b5f02e57 100644 --- a/esub/index.qmd +++ b/esub/index.qmd @@ -1,3 +1,59 @@ --- title: "eSubmission" --- + +## Overview + +This section provides examples for preparing electronic submissions (eSubmissions) to regulatory agencies using pharmaverse packages. eSubmissions are a critical component of the drug approval process, requiring properly formatted and validated datasets along with comprehensive documentation. + +The examples demonstrate how to leverage pharmaverse tools to ensure your submissions meet regulatory requirements and follow industry best practices. + +## Examples + +The following eSubmission examples are available: + +### Analysis Data Reviewer's Guide + +- **[ADRG (Analysis Data Reviewer's Guide)](esub.qmd)** - Learn how to create an Analysis Data Reviewer's Guide, a key document in regulatory submissions. The ADRG provides reviewers with essential information about the analysis datasets, data structures, and derivations used in the submission. This example demonstrates how to document dataset specifications, define.xml generation, and other critical components of a complete eSubmission package. + +## Key Components of eSubmissions + +Successful electronic submissions typically include: + +- **Analysis Datasets** - Properly formatted ADaM datasets in SAS transport (XPT) format +- **Define.xml** - Machine-readable dataset and variable definitions +- **ADRG** - Comprehensive guide to the analysis datasets and derivations +- **Analysis Results Metadata (ARM)** - Documentation of analysis outputs +- **Reviewers Guide** - Documentation to facilitate regulatory review + +## Regulatory Standards + +eSubmissions must comply with various regulatory standards and guidance: + +- **CDISC Standards** - SDTM, ADaM, Define-XML specifications +- **FDA Guidance** - Study Data Technical Conformance Guide +- **ICH Guidelines** - International standards for data standards and eCTD +- **Pinnacle 21** - Validation and conformance checking + +## Key Packages Used + +- **`{xportr}`** - Creating SAS transport files and performing eSub checks +- **`{metacore}`** - Managing metadata and specifications +- **Various pharmaverse packages** - Dataset creation and validation + +## Getting Started + +The examples demonstrate: + +- Preparing analysis datasets for submission +- Generating required documentation +- Validating datasets against specifications +- Creating submission-ready packages + +Following these examples will help ensure your submissions meet regulatory requirements and facilitate efficient review by regulatory agencies. + +## Resources + +For more information on eSubmissions and regulatory requirements, consult: +- [CDISC website](https://www.cdisc.org/) +- [FDA Study Data Standards Resources](https://www.fda.gov/industry/fda-data-standards-advisory-board/study-data-standards-resources) diff --git a/interactive/index.qmd b/interactive/index.qmd index 6d314849..86ddb367 100644 --- a/interactive/index.qmd +++ b/interactive/index.qmd @@ -1,3 +1,44 @@ --- title: "Interactive" --- + +## Overview + +This section showcases interactive applications and tools for exploring and analyzing clinical trial data. Interactive applications enable dynamic data exploration, real-time analysis updates, and enhanced collaboration among study teams. + +The examples demonstrate how pharmaverse packages can be used to create sophisticated interactive experiences for clinical data analysis and reporting. + +## Examples + +The following interactive application examples are available: + +### Interactive Data Exploration + +- **[Teal Applications](teal.qmd)** - Explore the `{teal}` framework for building modular, interactive Shiny applications specifically designed for clinical trial data analysis. Teal provides a standardized approach to creating interactive apps that integrate multiple analysis modules, enabling efficient data exploration, visualization, and reporting. + +## Benefits of Interactive Applications + +Interactive applications provide several advantages for clinical trial analysis: + +- **Dynamic Exploration** - Allow users to interactively filter, subset, and explore data without programming +- **Real-Time Updates** - See analysis results update instantly as parameters change +- **Reproducibility** - Maintain reproducible analyses while providing flexibility +- **Collaboration** - Enable statisticians, clinicians, and stakeholders to work together +- **Regulatory Review** - Facilitate reviewer exploration of study data and analyses + +## Key Packages Used + +- **`{teal}`** - Framework for building modular clinical trial Shiny applications +- **`{shiny}`** - Web application framework for R +- **Various pharmaverse packages** - Integrated for data processing and analysis + +## Getting Started + +The examples in this section may include interactive components that can be run locally or accessed through hosted applications. Follow the instructions in each example to set up and explore the interactive features. + +These tools are particularly valuable for: +- Exploratory data analysis +- Safety monitoring +- Efficacy assessment +- Data review meetings +- Regulatory interactions diff --git a/logging/index.qmd b/logging/index.qmd index 3453d5b3..59521dc0 100644 --- a/logging/index.qmd +++ b/logging/index.qmd @@ -1,3 +1,49 @@ --- title: "Logs" --- + +## Overview + +This section demonstrates best practices for implementing logging in clinical trial data analysis workflows using pharmaverse packages. Proper logging is essential for tracking data transformations, debugging issues, maintaining audit trails, and ensuring regulatory compliance. + +The examples show how to integrate logging capabilities into your analysis pipelines to create comprehensive records of data processing steps and program execution. + +## Examples + +The following logging examples are available: + +### Workflow Logging + +- **[Logging Implementation](logging.qmd)** - Learn how to implement comprehensive logging in your clinical trial analysis workflows. This example covers setting up logging infrastructure, capturing key events and data transformations, and creating audit-ready log files that document the entire analysis process. + +## Importance of Logging + +Effective logging provides critical benefits for clinical trial analyses: + +- **Audit Trail** - Create a complete record of all data transformations and analysis steps +- **Debugging** - Quickly identify and diagnose issues in complex data pipelines +- **Validation** - Support validation efforts by documenting program behavior +- **Regulatory Compliance** - Meet regulatory requirements for traceability and documentation +- **Quality Assurance** - Enable thorough review of analysis processes +- **Reproducibility** - Ensure analyses can be recreated and verified + +## Key Considerations + +When implementing logging in clinical trial workflows, consider: + +- **What to log** - Critical data transformations, decisions, warnings, and errors +- **Log format** - Structured, searchable, and human-readable output +- **Sensitive data** - Ensure patient privacy and data security in log files +- **Retention** - Appropriate storage and archival of log files +- **Performance** - Balance comprehensive logging with execution efficiency + +## Getting Started + +The logging examples demonstrate: + +- Setting up logging infrastructure +- Integrating logging into data processing workflows +- Capturing meaningful information at appropriate levels +- Creating log outputs suitable for regulatory review + +Implementing robust logging practices is an investment in code quality, maintainability, and regulatory readiness. diff --git a/sdtm/index.qmd b/sdtm/index.qmd index 1a418df8..3c337663 100644 --- a/sdtm/index.qmd +++ b/sdtm/index.qmd @@ -1,3 +1,36 @@ --- title: "SDTM" --- + +## Overview + +This section contains examples demonstrating the creation of Study Data Tabulation Model (SDTM) domains using pharmaverse packages. SDTM is a CDISC standard for organizing and formatting data to streamline the regulatory review process. + +The examples in this section primarily utilize the `{sdtm.oak}` package along with other pharmaverse tools to transform raw clinical trial data into SDTM-compliant datasets. + +## Examples + +The following SDTM domain examples are available: + +### Demographics and Baseline Characteristics + +- **[DM (Demographics)](dm.qmd)** - Learn how to create a Demographics domain including subject-level information such as age, sex, race, and study participation dates. + +### Clinical Events + +- **[AE (Adverse Events)](ae.qmd)** - Create an Adverse Events domain to capture information about adverse events experienced by subjects during the study. + +### Findings + +- **[VS (Vital Signs)](vs.qmd)** - Build a Vital Signs domain to record measurements such as blood pressure, heart rate, temperature, and other vital sign observations. + +## Getting Started + +Each example includes: + +- Introduction and context +- Step-by-step programming workflow +- Code examples using pharmaverse packages +- Expected output and validation checks + +Before working with these examples, it's recommended to review the [`{sdtm.oak}` package documentation](https://pharmaverse.github.io/sdtm.oak/) to understand key concepts such as algorithms, oak_id_vars, and mapping functions. diff --git a/tlg/index.qmd b/tlg/index.qmd index d5b03a13..d4501e3d 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -1,3 +1,48 @@ --- title: "TLG" --- + +## Overview + +This section demonstrates how to create Tables, Listings, and Graphs (TLGs) for clinical study reporting using pharmaverse packages. TLGs are essential components of clinical study reports and regulatory submissions, providing clear presentation of study results. + +The examples show how to generate publication-quality outputs using packages such as `{tfrmt}`, `{rtables}`, `{tern}`, and other pharmaverse tools, working with ADaM datasets as input. + +## Examples + +The following TLG examples are available: + +### Tables + +- **[Demographic Table](demographic.qmd)** - Create comprehensive demographic and baseline characteristics summary tables. This example illustrates two approaches: using Analysis Results Datasets (ARDs) following the CDISC Analysis Results Standard, and the classic method of creating summary tables directly from datasets. + +- **[Adverse Events Table](adverse_events.qmd)** - Generate adverse events summary tables with frequency counts and percentages. + +### Listings & Graphs + +- **[Pharmacokinetic Outputs](pharmacokinetic.qmd)** - Produce pharmacokinetic analysis outputs including concentration-time graphs and parameter summaries. + +## Approaches Demonstrated + +The examples in this section showcase different methodologies: + +1. **Analysis Results Datasets (ARDs)** - Using the emerging CDISC Analysis Results Standard for structured, reusable analysis results +2. **Direct Summarization** - Classic approach of creating summary tables directly from analysis datasets + +## Key Packages Used + +- **`{tfrmt}`** - Table formatting and layout control +- **`{rtables}`** - Flexible table creation with complex layouts +- **`{tern}`** - Analysis and reporting functions for clinical trials +- **`{ggplot2}`** - Publication-quality graphics + +## Getting Started + +Each example includes: + +- Data preprocessing and preparation +- Summary statistics calculation +- Table or graph generation +- Formatting and styling for publication + +All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consistency and reproducibility across examples. From 6006c8a636a52b648708ec6aa8c0bbbcf802f784 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 11:18:07 -0600 Subject: [PATCH 03/23] #120 add landing page for each section --- adam/index.qmd | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/adam/index.qmd b/adam/index.qmd index 3fc3993b..79ed4880 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -14,38 +14,42 @@ The following ADaM dataset examples are available: ### Subject-Level Analysis Dataset -- **[ADSL (Subject-Level Analysis Dataset)](adsl.qmd)** - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. +- [**ADSL (Subject-Level Analysis Dataset)**](adsl.qmd) - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. ### Basic Data Structure (BDS) Analysis Datasets -- **[ADAE (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. -- **[ADVS (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. -- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for efficacy endpoints. +- [**ADAE (Adverse Events Analysis)**](adae.qmd) - Build an analysis dataset for adverse events with derived variables for analysis and reporting. +- [**ADVS (Vital Signs Analysis)**](advs.qmd) - Generate vital signs analysis dataset with baseline and change from baseline calculations. +- [**ADRS (Response Analysis)**](adrs.qmd) - Create response analysis dataset for efficacy endpoints. ### Time-to-Event Analysis Dataset -- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop time-to-event analysis dataset for survival analyses. +- [**ADTTE (Time-to-Event Analysis)**](adtte.qmd) - Develop time-to-event analysis dataset for survival analyses. ### Pharmacokinetic Analysis Datasets -- **[ADPC (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset. -- **[ADPPK (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset. +- [**ADPC (Pharmacokinetic Concentrations)**](adpc.qmd) - Build pharmacokinetic concentration analysis dataset. +- [**ADPPK (Population Pharmacokinetic)**](adppk.qmd) - Create population pharmacokinetic analysis dataset. ## Key Packages Used -- **[`{admiral}`](https://pharmaverse.github.io/admiral/)** - Core ADaM derivations and functions -- **[`{metacore}`](https://atorus-research.github.io/metacore/)** - Metadata and specifications management -- **[`{metatools}`](https://pharmaverse.github.io/metatools/)** - Dataset building and validation using metadata -- **[`{xportr}`](https://atorus-research.github.io/xportr/)** - SAS transport file creation and eSub checks +- [**`{admiral}`**](https://pharmaverse.github.io/admiral/) - Core ADaM derivations and functions +- [**`{metacore}`**](https://atorus-research.github.io/metacore/) - Metadata and specifications management +- [**`{metatools}`**](https://pharmaverse.github.io/metatools/) - Dataset building and validation using metadata +- [**`{xportr}`**](https://atorus-research.github.io/xportr/) - SAS transport file creation and eSub checks + +## Meet the `{admiral}` Family + +- [**Admiral Family**](https://pharmaverse.org/e2eclinical/adam/) - Explore the `{admiral}` extension packages including `{admiralonco}`, `{admiralophtha}`, `{admiralvaccine}`, etc. ## Getting Started Each example demonstrates: -- Data input from SDTM datasets -- Derivation of analysis variables -- Application of metadata specifications -- Dataset validation and checks -- Export to SAS transport format +- Data input from SDTM datasets +- Derivation of analysis variables +- Application of metadata specifications +- Dataset validation and checks +- Export to SAS transport format -We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. +We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. \ No newline at end of file From 9ed0f52dee4d8f5cfb8d85693296bfc167a7e986 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 11:32:19 -0600 Subject: [PATCH 04/23] #120 styler and spelling --- adam/index.qmd | 2 +- inst/WORDLIST | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/adam/index.qmd b/adam/index.qmd index 79ed4880..6c052c95 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -52,4 +52,4 @@ Each example demonstrates: - Dataset validation and checks - Export to SAS transport format -We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. \ No newline at end of file +We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. diff --git a/inst/WORDLIST b/inst/WORDLIST index a57298a7..fd375e16 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -16,6 +16,8 @@ adlb ADLB admiraldiscovery admiralonco +admiralophtha +admiralvaccine adpc ADPC adppk @@ -218,6 +220,7 @@ Creatinine creatu CRF CRP +CSRs css csv ctype @@ -384,6 +387,7 @@ htmltools htmlwidgets httpuv IC +ICH iconv ifelse iframe @@ -572,6 +576,7 @@ prgB processx profvis programTOC +programmatically PROJID PROJIDN ps @@ -642,6 +647,7 @@ rv rx SAE SAFFL +SAPs sas SASFL SCRFDT @@ -714,6 +720,7 @@ TEMPLOC TESTCD tf tformat +tfrmt tgdt tgt thevalidatoR From 38e62d0962974258dab63a1222737849e047ed44 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 14:05:12 -0600 Subject: [PATCH 05/23] #120 test exclude relative link check to qmd files --- .github/workflows/link_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index f346326b..9b261cb6 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -29,5 +29,6 @@ jobs: uses: lycheeverse/lychee-action@v1.8.0 with: fail: true + exclude-paths: "**/*.qmd" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 069ffa92d129241bed8490ee169472fb2aaf5f5d Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 14:17:33 -0600 Subject: [PATCH 06/23] #120 spelling --- inst/WORDLIST | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index fd375e16..0632c907 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -320,6 +320,7 @@ EOSDT eosstt EOSSTT EPI +esub eSub eSubmission eval @@ -702,6 +703,7 @@ subperiods SUBPOS substr summarise +Summarization summaryrec suppdm SUPPDM From ac94c5f053bb3a16ef6e861f7fd045468ac011f0 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 14:18:30 -0600 Subject: [PATCH 07/23] #120 test update switch for relative links --- .github/workflows/link_check.yml | 17 ++++++++++---- R/switch.R | 40 ++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index 9b261cb6..6603ed80 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -11,24 +11,31 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up R # Install R from CRAN + - name: Set up R uses: r-lib/actions/setup-r@v2 with: - r-version: '4.4.3' # You can specify a different R version if needed + r-version: '4.4.3' - name: Install R packages run: | Rscript -e 'install.packages("fs")' shell: bash - - name: Switch .qmd to .md + - name: Switch .qmd to .md and Update Links run: Rscript R/switch.R shell: bash + - name: Verify .qmd Conversion + run: | + if ls **/*.qmd; then + echo "Error: .qmd files still exist after switch.R!" + exit 1 + fi + echo "All .qmd files successfully converted to .md." + - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 with: fail: true - exclude-paths: "**/*.qmd" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/R/switch.R b/R/switch.R index 7d029cfe..925b135c 100644 --- a/R/switch.R +++ b/R/switch.R @@ -1,51 +1,57 @@ -#' fixes link-check problem -#' Finds whether any files use the string: "(.mailto:" for linking email adresses -#' then just replaces with: "(mailto:" as is markdown standard +#' Fixes link-check problem +#' - Finds files that use the string "(.mailto:" and corrects to "(mailto:" +#' - Updates links to `.qmd` files to point to `.md` files. #' #' @param file_list vector of filenames #' -#' @return messages only. side effect is: changes files. +#' @return messages. Side effect: modifies files. modify_files <- function(file_list) { - # Create an empty vector to store the file names that contain the string + # Create an empty vector to store file names that need modifications matching_files <- c() - # Iterate over each file in the directory + # Iterate over each file to check for issues for (file in file_list) { # Read the contents of the file file_contents <- readLines(file) - # Check if the file contains the string "(.mailto:" - if (any(grepl("\\(\\.mailto:", file_contents))) { + # Check if the file contains the string "(.mailto:" OR references to `.qmd` files + if (any(grepl("\\(\\.mailto:", file_contents)) || any(grepl("\\.qmd\\)", file_contents))) { # Add the file name to the vector matching_files <- c(matching_files, file) } } - # Iterate over the matching files + # Iterate over the matching files to apply fixes for (file in matching_files) { # Read the contents of the file file_contents <- readLines(file) - # Remove the "." from each line that contains the string + # Fix email links modified_contents <- gsub("\\(\\.mailto:", "(mailto:", file_contents) + # Update links to `.qmd` files to point to `.md` files + # Matches patterns like `[text](filename.qmd)` and replaces `.qmd` with `.md` + modified_contents <- gsub("\\.qmd\\)", ".md)", modified_contents) + # Write the modified contents back to the file writeLines(modified_contents, file) - # Print a message indicating the modification has been made + # Print a message indicating what modifications have been made message("Modified file:", file, "\n") } - # Print the list of matching files + # Print a list of matching files that were modified message("Matching files:", matching_files, "\n") } -# get all qmd files +# Get all `.qmd` files all_qmd <- list.files(full.names = FALSE, all.files = FALSE, pattern = ".qmd$", recursive = TRUE) -# modify if needed the link to email problem for link checker +# Modify files to fix email links and update `.qmd` references modify_files(all_qmd) -# get filenames ending with .md + +# Generate a list of `.md` filenames that will replace `.qmd` files all_md <- gsub(".qmd$", ".md", all_qmd) -# rename all files -file.rename(all_qmd, all_md) + +# Rename all `.qmd` files to `.md` +file.rename(all_qmd, all_md) \ No newline at end of file From 5e21f2a8a137e1a60fb28ae5fe0327749606bfe7 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 14:49:48 -0600 Subject: [PATCH 08/23] #120 styler --- R/switch.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/switch.R b/R/switch.R index 925b135c..6ecbefdb 100644 --- a/R/switch.R +++ b/R/switch.R @@ -54,4 +54,4 @@ modify_files(all_qmd) all_md <- gsub(".qmd$", ".md", all_qmd) # Rename all `.qmd` files to `.md` -file.rename(all_qmd, all_md) \ No newline at end of file +file.rename(all_qmd, all_md) From 0a0518548b078e3ceac1543bcb3fadcf2fb37754 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 15:00:16 -0600 Subject: [PATCH 09/23] #120 test link checker --- .github/workflows/link_check.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index 6603ed80..6f64dc44 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -11,31 +11,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up R + - name: Set up R # Install R from CRAN uses: r-lib/actions/setup-r@v2 with: - r-version: '4.4.3' + r-version: '4.4.3' # You can specify a different R version if needed - name: Install R packages run: | Rscript -e 'install.packages("fs")' shell: bash - - name: Switch .qmd to .md and Update Links - run: Rscript R/switch.R - shell: bash - - - name: Verify .qmd Conversion - run: | - if ls **/*.qmd; then - echo "Error: .qmd files still exist after switch.R!" - exit 1 - fi - echo "All .qmd files successfully converted to .md." - - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 with: fail: true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e9e1048f33c17f646c399c61c1167cdbfbcb2cc1 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 15:42:38 -0600 Subject: [PATCH 10/23] #120 update TLG index to distinguish approaches #122 --- tlg/index.qmd | 126 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 103 insertions(+), 23 deletions(-) diff --git a/tlg/index.qmd b/tlg/index.qmd index d4501e3d..6adbdca1 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -6,43 +6,123 @@ title: "TLG" This section demonstrates how to create Tables, Listings, and Graphs (TLGs) for clinical study reporting using pharmaverse packages. TLGs are essential components of clinical study reports and regulatory submissions, providing clear presentation of study results. -The examples show how to generate publication-quality outputs using packages such as `{tfrmt}`, `{rtables}`, `{tern}`, and other pharmaverse tools, working with ADaM datasets as input. +The examples showcase **two distinct approaches** for generating publication-quality outputs, working with ADaM datasets as input. -## Examples +## Which Approach Should I Use? -The following TLG examples are available: +### Analysis Results Datasets (ARDs) 🆕 -### Tables +**Best for:** -- **[Demographic Table](demographic.qmd)** - Create comprehensive demographic and baseline characteristics summary tables. This example illustrates two approaches: using Analysis Results Datasets (ARDs) following the CDISC Analysis Results Standard, and the classic method of creating summary tables directly from datasets. +- Organizations implementing the CDISC Analysis Results Standard +- Teams wanting reusable, structured analysis results +- Projects requiring multiple output formats from the same statistics +- Regulatory submissions emphasizing data standardization and traceability +- Separating statistical computation from table formatting -- **[Adverse Events Table](adverse_events.qmd)** - Generate adverse events summary tables with frequency counts and percentages. +**Packages:** `{cards}`, `{tfrmt}`, `{gtsummary}` -### Listings & Graphs +**Workflow:** Data → ARD (structured statistics) → Formatted Table + +### Classic Direct Summarization 📊 + +**Best for:** + +- Quick ad-hoc analyses and exploratory work +- Teams familiar with traditional R table packages +- Complex nested layouts requiring fine-grained control +- Existing workflows using `{rtables}`/`{tern}` +- Single-purpose table generation + +**Packages:** `{rtables}`, `{tern}` + +**Workflow:** Data → Formatted Table (single step) + +::: callout-tip +## Getting Started + +Both approaches produce publication-quality outputs - the choice depends on your workflow and organizational standards. ARDs represent the emerging standard for structured analysis results, while the classic approach offers a mature, stable ecosystem with extensive layout capabilities. +::: + +## Examples by Approach + +### Using Analysis Results Datasets (ARDs) + +These examples leverage the CDISC Analysis Results Standard, creating structured ARDs first using `{cards}`, then formatting them into tables. This two-step approach promotes reusability, standardization, and separation of statistical computation from presentation. + +#### Demographic Tables + +- [**{cards} + {gtsummary}**](demographic.qmd#gtsummary-cards) - Build demographics from ARDs with bidirectional workflow (ARD → Table or Table → ARD) +- [**{cards} + {tfrmt}**](demographic.qmd#tfrmt-cards) - Create highly customized demographic tables from ARDs + +#### Adverse Events Tables + +- [**{cards} + {tfrmt}**](adverse_events.qmd#tfrmt-cards) - Generate AE summaries with hierarchical organization and custom formatting + +------------------------------------------------------------------------ -- **[Pharmacokinetic Outputs](pharmacokinetic.qmd)** - Produce pharmacokinetic analysis outputs including concentration-time graphs and parameter summaries. +### Classic Direct Summarization -## Approaches Demonstrated +These examples create tables directly from analysis datasets using the traditional single-step approach with `{rtables}` and `{tern}`. -The examples in this section showcase different methodologies: +#### Demographic Tables -1. **Analysis Results Datasets (ARDs)** - Using the emerging CDISC Analysis Results Standard for structured, reusable analysis results -2. **Direct Summarization** - Classic approach of creating summary tables directly from analysis datasets +- [**{rtables} + {tern}**](demographic.qmd#rtables-tern) - Comprehensive demographic and baseline characteristics summaries + +#### Adverse Events Tables + +- [**{rtables} + {tern}**](adverse_events.qmd#rtables-tern) - AE summaries with frequency counts, percentages, and system organ class groupings + +------------------------------------------------------------------------ + +### Listings & Graphs + +- [**Pharmacokinetic Outputs**](pharmacokinetic.qmd) - Concentration-time graphs and parameter summaries + +## Quick Reference Table + +| Table Type | ARD Approach | Classic Approach | +|--------------------|-----------------------|-----------------------------| +| **Demographics** | [{cards} + {gtsummary}](demographic.qmd#gtsummary-cards)
[{cards} + {tfrmt}](demographic.qmd#tfrmt-cards) | [{rtables} + {tern}](demographic.qmd#rtables-tern) | +| **Adverse Events** | [{cards} + {tfrmt}](adverse_events.qmd#tfrmt-cards) | [{rtables} + {tern}](adverse_events.qmd#rtables-tern) | +| **PK Outputs** | *Coming soon* | [View example](pharmacokinetic.qmd) | ## Key Packages Used -- **`{tfrmt}`** - Table formatting and layout control -- **`{rtables}`** - Flexible table creation with complex layouts -- **`{tern}`** - Analysis and reporting functions for clinical trials -- **`{ggplot2}`** - Publication-quality graphics +### ARD Ecosystem -## Getting Started +- **`{cards}`** - Create and manipulate Analysis Results Datasets following CDISC standards +- **`{tfrmt}`** - Transform ARDs into publication-ready tables with precise formatting control +- **`{gtsummary}`** - Generate summary tables from ARDs with support for multiple output formats + +### Classic Ecosystem + +- **`{rtables}`** - Create complex tables with flexible layouts and nested structures +- **`{tern}`** - Analysis and reporting functions specifically designed for clinical trials + +### Graphics + +- **`{ggplot2}`** - Publication-quality graphics for all approaches + +## What Each Example Includes + +All examples provide complete, reproducible code with: + +- Data preprocessing and preparation steps +- Summary statistics calculation +- Table or graph generation with detailed explanations +- Formatting and styling for publication-ready output +- Comments and best practices + +All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consistency and reproducibility. -Each example includes: +## Learn More -- Data preprocessing and preparation -- Summary statistics calculation -- Table or graph generation -- Formatting and styling for publication +::: callout-note +## Resources -All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consistency and reproducibility across examples. +- [CDISC Analysis Results Standard](https://www.cdisc.org/standards/foundational/analysis-results-standard) - Official standard documentation +- [{cards} package documentation](https://insightsengineering.github.io/cards/) - Learn more about creating ARDs +- [{tfrmt} package documentation](https://gsk-biostatistics.github.io/tfrmt/) - Advanced table formatting with ARDs +- [{rtables} package documentation](https://insightsengineering.github.io/rtables/) - Comprehensive table creation guide +::: \ No newline at end of file From 0ba3d8bc95e0743728edcb2e8b0cc20d4fc5d8e4 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 15:51:19 -0600 Subject: [PATCH 11/23] #120 styler and spelling --- inst/WORDLIST | 2 ++ tlg/index.qmd | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inst/WORDLIST b/inst/WORDLIST index 0632c907..28f936f0 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -187,6 +187,7 @@ cachem cairo cairoFT callr +callout categorizationvars cdisc CDISC @@ -619,6 +620,7 @@ repo reproducibility req requireNamespace +reusability revealjs rex RFENDTC diff --git a/tlg/index.qmd b/tlg/index.qmd index 6adbdca1..baa0c507 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -125,4 +125,4 @@ All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consi - [{cards} package documentation](https://insightsengineering.github.io/cards/) - Learn more about creating ARDs - [{tfrmt} package documentation](https://gsk-biostatistics.github.io/tfrmt/) - Advanced table formatting with ARDs - [{rtables} package documentation](https://insightsengineering.github.io/rtables/) - Comprehensive table creation guide -::: \ No newline at end of file +::: From eee8c947166a924e1523a8d0eab28765932be1a8 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 16:10:43 -0600 Subject: [PATCH 12/23] #120 updates to ADAM index --- adam/index.qmd | 106 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 23 deletions(-) diff --git a/adam/index.qmd b/adam/index.qmd index 6c052c95..c99046bd 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -10,46 +10,106 @@ The examples demonstrate how to leverage multiple pharmaverse packages together, ## Examples -The following ADaM dataset examples are available: +### Subject-Level Analysis Dataset (ADSL) -### Subject-Level Analysis Dataset +- **[ADSL (Subject-Level Analysis Dataset)](adsl.qmd)** - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. -- [**ADSL (Subject-Level Analysis Dataset)**](adsl.qmd) - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. +::: {.callout-tip} +## Start Here +ADSL is the foundation for most other ADaM datasets. We recommend starting with this example if you're new to ADaM development with pharmaverse packages. ADSL contains one record per subject and serves as the basis for merging subject-level variables into other ADaM datasets. +::: ### Basic Data Structure (BDS) Analysis Datasets -- [**ADAE (Adverse Events Analysis)**](adae.qmd) - Build an analysis dataset for adverse events with derived variables for analysis and reporting. -- [**ADVS (Vital Signs Analysis)**](advs.qmd) - Generate vital signs analysis dataset with baseline and change from baseline calculations. -- [**ADRS (Response Analysis)**](adrs.qmd) - Create response analysis dataset for efficacy endpoints. +BDS datasets follow a standard structure with one observation per subject per analysis parameter per analysis timepoint. These are commonly used for efficacy and safety analyses. -### Time-to-Event Analysis Dataset +- **[ADVS (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. +- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for efficacy endpoints. -- [**ADTTE (Time-to-Event Analysis)**](adtte.qmd) - Develop time-to-event analysis dataset for survival analyses. +### Occurrence Data Structure (OCCDS) Analysis Datasets + +OCCDS datasets have one observation per subject per occurrence of an event, capturing multiple events per subject. + +- **[ADAE (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. + +### Time-to-Event Analysis Dataset (ADTTE) + +- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop time-to-event analysis dataset for survival analyses, including censoring and event derivations. ### Pharmacokinetic Analysis Datasets -- [**ADPC (Pharmacokinetic Concentrations)**](adpc.qmd) - Build pharmacokinetic concentration analysis dataset. -- [**ADPPK (Population Pharmacokinetic)**](adppk.qmd) - Create population pharmacokinetic analysis dataset. +- **[ADPC (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset with timepoint derivations. +- **[ADPPK (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset for modeling and simulation. + +## Quick Reference + +| Dataset Type | Example | Key Packages | Structure | +|--------------|---------|--------------|-----------| +| **Subject-Level** | [ADSL](adsl.qmd) | admiral, metacore, metatools, xportr | One record per subject | +| **BDS - Vitals** | [ADVS](advs.qmd) | admiral, metacore, metatools | One record per subject per parameter per timepoint | +| **BDS - Response** | [ADRS](adrs.qmd) | admiral, metacore, metatools | One record per subject per parameter per timepoint | +| **OCCDS - Safety** | [ADAE](adae.qmd) | admiral, metacore, metatools | One record per subject per event | +| **Time-to-Event** | [ADTTE](adtte.qmd) | admiral, metacore, metatools | One record per subject per parameter | +| **PK Concentration** | [ADPC](adpc.qmd) | admiral, metacore, metatools | One record per subject per timepoint per analyte | +| **Population PK** | [ADPPK](adppk.qmd) | admiral, metacore, metatools | One record per subject per timepoint | + +## Workflow Overview + +Each example demonstrates a consistent workflow for creating ADaM datasets: + +1. **Data Input** - Load SDTM datasets and required metadata specifications +2. **Derivations** - Apply ADaM derivation functions to create analysis variables (e.g., baseline flags, change from baseline, derived parameters) +3. **Metadata Application** - Use metadata specifications to control dataset attributes, labels, and formats +4. **Validation** - Perform dataset checks and validation against specifications +5. **Export** - Create SAS transport files ready for regulatory submission + +::: {.callout-note} +## Dataset Dependencies + +Most ADaM datasets require ADSL as input for subject-level variables. The typical flow is: + +**SDTM datasets** → **ADSL** → **Other ADaM datasets** → **TLGs** +::: ## Key Packages Used -- [**`{admiral}`**](https://pharmaverse.github.io/admiral/) - Core ADaM derivations and functions -- [**`{metacore}`**](https://atorus-research.github.io/metacore/) - Metadata and specifications management -- [**`{metatools}`**](https://pharmaverse.github.io/metatools/) - Dataset building and validation using metadata -- [**`{xportr}`**](https://atorus-research.github.io/xportr/) - SAS transport file creation and eSub checks +- **[`{admiral}`](https://pharmaverse.github.io/admiral/)** - Core ADaM derivations and functions for creating analysis datasets following CDISC standards +- **[`{metacore}`](https://atorus-research.github.io/metacore/)** - Metadata and specifications management, storing variable-level metadata +- **[`{metatools}`](https://pharmaverse.github.io/metatools/)** - Dataset building and validation using metadata, applying specifications to datasets +- **[`{xportr}`](https://atorus-research.github.io/xportr/)** - SAS transport file creation and eSub compliance checks for regulatory submissions ## Meet the `{admiral}` Family -- [**Admiral Family**](https://pharmaverse.org/e2eclinical/adam/) - Explore the `{admiral}` extension packages including `{admiralonco}`, `{admiralophtha}`, `{admiralvaccine}`, etc. +The `{admiral}` ecosystem includes specialized extension packages for different therapeutic areas and study types: + +- **[Admiral Family Overview](https://pharmaverse.org/e2eclinical/adam/)** - Explore the complete admiral family +- **`{admiralonco}`** - Oncology-specific ADaM datasets (e.g., ADRS for tumor response, ADTTE for overall survival) +- **`{admiralophtha}`** - Ophthalmology endpoints and analysis datasets +- **`{admiralvaccine}`** - Vaccine trial datasets including immunogenicity and reactogenicity +- **Additional extensions** - Packages for other therapeutic areas are under development + +Each extension package builds on `{admiral}` core functionality while providing domain-specific derivations. + +## Additional Resources + +::: {.callout-note} +## Learn More + +- [CDISC ADaM Implementation Guide](https://www.cdisc.org/standards/foundational/adam) - Official ADaM standard documentation and data structure specifications +- [{admiral} Documentation](https://pharmaverse.github.io/admiral/) - Comprehensive guide to admiral functions, workflows, and best practices +- [Pharmaverse E2E Clinical Reporting](https://pharmaverse.org/e2eclinical/) - End-to-end examples showing the full pipeline from SDTM to TLGs +- [{admiral} Vignettes](https://pharmaverse.github.io/admiral/articles/) - Detailed articles on specific derivation patterns and use cases +::: -## Getting Started +## Common Derivations Across Examples -Each example demonstrates: +While each ADaM dataset has unique requirements, several derivation patterns appear across multiple examples: -- Data input from SDTM datasets -- Derivation of analysis variables -- Application of metadata specifications -- Dataset validation and checks -- Export to SAS transport format +- **Baseline derivations** - Identifying and flagging baseline records +- **Change from baseline** - Calculating analysis values relative to baseline +- **Analysis flags** - Creating indicators for analysis populations and key events +- **Date/time imputations** - Handling partial or missing dates +- **Treatment variables** - Deriving planned and actual treatment information +- **Parameter derivations** - Creating derived or calculated parameters -We recommend starting with ADSL, as it serves as the foundation for most other ADaM datasets. +These common patterns are demonstrated throughout the examples, showing how `{admiral}` functions can be reused across different dataset types. From 0ae3a34ad9ab0eb460a0915108331a0b9e860e63 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Wed, 14 Jan 2026 16:15:35 -0600 Subject: [PATCH 13/23] #120 spelling --- inst/WORDLIST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index 28f936f0..2e9bc488 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -393,6 +393,7 @@ ICH iconv ifelse iframe +immunogenicity init inputId installedpackages @@ -494,6 +495,7 @@ nVersion NXRLT oakidvars OCC +OCCDS occflags OID onco @@ -600,6 +602,7 @@ Rcpp rds reactable readct +reactogenicity readdata readline README From 042deb4d5a292cfd8376ec06227d23542fafdeb0 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Fri, 16 Jan 2026 15:12:15 -0600 Subject: [PATCH 14/23] #120 a few formatting edits --- tlg/index.qmd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tlg/index.qmd b/tlg/index.qmd index baa0c507..2e0e6f67 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -38,7 +38,7 @@ The examples showcase **two distinct approaches** for generating publication-qua **Workflow:** Data → Formatted Table (single step) -::: callout-tip +::: {.callout-tip} ## Getting Started Both approaches produce publication-quality outputs - the choice depends on your workflow and organizational standards. ARDs represent the emerging standard for structured analysis results, while the classic approach offers a mature, stable ecosystem with extensive layout capabilities. @@ -52,12 +52,12 @@ These examples leverage the CDISC Analysis Results Standard, creating structured #### Demographic Tables -- [**{cards} + {gtsummary}**](demographic.qmd#gtsummary-cards) - Build demographics from ARDs with bidirectional workflow (ARD → Table or Table → ARD) -- [**{cards} + {tfrmt}**](demographic.qmd#tfrmt-cards) - Create highly customized demographic tables from ARDs +- **[{cards} + {gtsummary}](demographic.qmd#gtsummary-cards)** - Build demographics from ARDs with bidirectional workflow (ARD → Table or Table → ARD) +- **[{cards} + {tfrmt}](demographic.qmd#tfrmt-cards)** - Create highly customized demographic tables from ARDs #### Adverse Events Tables -- [**{cards} + {tfrmt}**](adverse_events.qmd#tfrmt-cards) - Generate AE summaries with hierarchical organization and custom formatting +- **[{cards} + {tfrmt}](adverse_events.qmd#tfrmt-cards)** - Generate AE summaries with hierarchical organization and custom formatting ------------------------------------------------------------------------ @@ -67,17 +67,17 @@ These examples create tables directly from analysis datasets using the tradition #### Demographic Tables -- [**{rtables} + {tern}**](demographic.qmd#rtables-tern) - Comprehensive demographic and baseline characteristics summaries +- **[{rtables} + {tern}](demographic.qmd#rtables-tern)** - Comprehensive demographic and baseline characteristics summaries #### Adverse Events Tables -- [**{rtables} + {tern}**](adverse_events.qmd#rtables-tern) - AE summaries with frequency counts, percentages, and system organ class groupings +- **[{rtables} + {tern}](adverse_events.qmd#rtables-tern)** - AE summaries with frequency counts, percentages, and system organ class groupings ------------------------------------------------------------------------ ### Listings & Graphs -- [**Pharmacokinetic Outputs**](pharmacokinetic.qmd) - Concentration-time graphs and parameter summaries +- **[Pharmacokinetic Outputs](pharmacokinetic.qmd)** - Concentration-time graphs and parameter summaries ## Quick Reference Table @@ -118,7 +118,7 @@ All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consi ## Learn More -::: callout-note +::: {.callout-note} ## Resources - [CDISC Analysis Results Standard](https://www.cdisc.org/standards/foundational/analysis-results-standard) - Official standard documentation From f631e5c11aedb7495a2a5c86af4a70d22a877de4 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 09:17:49 -0600 Subject: [PATCH 15/23] Update adam/index.qmd Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com> --- adam/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adam/index.qmd b/adam/index.qmd index c99046bd..6b433c0e 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -24,7 +24,7 @@ ADSL is the foundation for most other ADaM datasets. We recommend starting with BDS datasets follow a standard structure with one observation per subject per analysis parameter per analysis timepoint. These are commonly used for efficacy and safety analyses. - **[ADVS (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. -- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for efficacy endpoints. +- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for oncology efficacy endpoints. ### Occurrence Data Structure (OCCDS) Analysis Datasets From 577c600331c795b459893e3eee7fbc4ce0b2b481 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 09:18:04 -0600 Subject: [PATCH 16/23] Update adam/index.qmd Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com> --- adam/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adam/index.qmd b/adam/index.qmd index 6b433c0e..4501537b 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -34,7 +34,7 @@ OCCDS datasets have one observation per subject per occurrence of an event, capt ### Time-to-Event Analysis Dataset (ADTTE) -- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop time-to-event analysis dataset for survival analyses, including censoring and event derivations. +- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop oncology time-to-event analysis dataset for survival analyses, including censoring and event derivations. ### Pharmacokinetic Analysis Datasets From 7fc53916de863d9cc1268963df1afce3a489fb8a Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 09:19:26 -0600 Subject: [PATCH 17/23] Update tlg/index.qmd Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com> --- tlg/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tlg/index.qmd b/tlg/index.qmd index 2e0e6f67..8f58274b 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -93,7 +93,7 @@ These examples create tables directly from analysis datasets using the tradition - **`{cards}`** - Create and manipulate Analysis Results Datasets following CDISC standards - **`{tfrmt}`** - Transform ARDs into publication-ready tables with precise formatting control -- **`{gtsummary}`** - Generate summary tables from ARDs with support for multiple output formats +- **`{gtsummary}`** - Generate listings or summary tables (with or without ARDs) with support for multiple output formats ### Classic Ecosystem From 446efd5771df60d44dc004fbcbaab45edd0b1c5c Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 09:49:10 -0600 Subject: [PATCH 18/23] #120 updates from review --- adam/index.qmd | 42 +++++++++++++++++++++--------------------- sdtm/index.qmd | 2 ++ tlg/index.qmd | 2 ++ 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/adam/index.qmd b/adam/index.qmd index 4501537b..92cead7e 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -8,50 +8,52 @@ This section provides end-to-end examples for creating Analysis Data Model (ADaM The examples demonstrate how to leverage multiple pharmaverse packages together, including `{admiral}`, `{metacore}`, `{metatools}`, and `{xportr}`, to build analysis-ready datasets from SDTM data. +All examples use SDTM datasets from `{pharmaversesdtm}` as input, ensuring consistency and reproducibility. + ## Examples -### Subject-Level Analysis Dataset (ADSL) +### Subject-Level Analysis Dataset (`ADSL`) - **[ADSL (Subject-Level Analysis Dataset)](adsl.qmd)** - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. ::: {.callout-tip} ## Start Here -ADSL is the foundation for most other ADaM datasets. We recommend starting with this example if you're new to ADaM development with pharmaverse packages. ADSL contains one record per subject and serves as the basis for merging subject-level variables into other ADaM datasets. +`ADSL` is the foundation for most other ADaM datasets. We recommend starting with this example if you're new to ADaM development with pharmaverse packages. `ADSL` contains one record per subject and serves as the basis for merging subject-level variables into other ADaM datasets. ::: ### Basic Data Structure (BDS) Analysis Datasets BDS datasets follow a standard structure with one observation per subject per analysis parameter per analysis timepoint. These are commonly used for efficacy and safety analyses. -- **[ADVS (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. -- **[ADRS (Response Analysis)](adrs.qmd)** - Create response analysis dataset for oncology efficacy endpoints. +- **[`ADVS` (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. +- **[`ADRS` (Response Analysis)](adrs.qmd)** - Create response analysis dataset for oncology efficacy endpoints. ### Occurrence Data Structure (OCCDS) Analysis Datasets OCCDS datasets have one observation per subject per occurrence of an event, capturing multiple events per subject. -- **[ADAE (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. +- **[`ADAE` (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. -### Time-to-Event Analysis Dataset (ADTTE) +### Time-to-Event Analysis Dataset (`ADTTE`) -- **[ADTTE (Time-to-Event Analysis)](adtte.qmd)** - Develop oncology time-to-event analysis dataset for survival analyses, including censoring and event derivations. +- **[`ADTTE` (Time-to-Event Analysis)](adtte.qmd)** - Develop oncology time-to-event analysis dataset for survival analyses, including censoring and event derivations. ### Pharmacokinetic Analysis Datasets -- **[ADPC (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset with timepoint derivations. -- **[ADPPK (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset for modeling and simulation. +- **[`ADPC` (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset with timepoint derivations. +- **[`ADPPK` (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset for modeling and simulation. ## Quick Reference | Dataset Type | Example | Key Packages | Structure | |--------------|---------|--------------|-----------| -| **Subject-Level** | [ADSL](adsl.qmd) | admiral, metacore, metatools, xportr | One record per subject | -| **BDS - Vitals** | [ADVS](advs.qmd) | admiral, metacore, metatools | One record per subject per parameter per timepoint | -| **BDS - Response** | [ADRS](adrs.qmd) | admiral, metacore, metatools | One record per subject per parameter per timepoint | -| **OCCDS - Safety** | [ADAE](adae.qmd) | admiral, metacore, metatools | One record per subject per event | -| **Time-to-Event** | [ADTTE](adtte.qmd) | admiral, metacore, metatools | One record per subject per parameter | -| **PK Concentration** | [ADPC](adpc.qmd) | admiral, metacore, metatools | One record per subject per timepoint per analyte | -| **Population PK** | [ADPPK](adppk.qmd) | admiral, metacore, metatools | One record per subject per timepoint | +| **Subject-Level** | [`ADSL`](adsl.qmd) | admiral, metacore, metatools, xportr | One record per subject | +| **BDS - Vitals** | [`ADVS`](advs.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint | +| **BDS - Response** | [`ADRS`](adrs.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint | +| **OCCDS - Safety** | [`ADAE`](adae.qmd) | admiral, metacore, metatools, xportr | One record per subject per event | +| **Time-to-Event** | [`ADTTE`](adtte.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter | +| **PK Concentration** | [`ADPC`](adpc.qmd) | admiral, metacore, metatools, xportr | One record per subject per timepoint per analyte | +| **Population PK** | [`ADPPK`](adppk.qmd) | admiral, metacore, metatools, xportr | One record per subject per timepoint | ## Workflow Overview @@ -66,9 +68,9 @@ Each example demonstrates a consistent workflow for creating ADaM datasets: ::: {.callout-note} ## Dataset Dependencies -Most ADaM datasets require ADSL as input for subject-level variables. The typical flow is: +Most ADaM datasets require `ADSL` as input for subject-level variables. The typical flow is: -**SDTM datasets** → **ADSL** → **Other ADaM datasets** → **TLGs** +**SDTM datasets** → **`ADSL`** → **Other ADaM datasets** → **TLGs** ::: ## Key Packages Used @@ -83,9 +85,7 @@ Most ADaM datasets require ADSL as input for subject-level variables. The typica The `{admiral}` ecosystem includes specialized extension packages for different therapeutic areas and study types: - **[Admiral Family Overview](https://pharmaverse.org/e2eclinical/adam/)** - Explore the complete admiral family -- **`{admiralonco}`** - Oncology-specific ADaM datasets (e.g., ADRS for tumor response, ADTTE for overall survival) -- **`{admiralophtha}`** - Ophthalmology endpoints and analysis datasets -- **`{admiralvaccine}`** - Vaccine trial datasets including immunogenicity and reactogenicity +- **Extension Packages** - These packages provide additional therapeutic area support, for example including functions for oncology endpoints such as RECIST v1.1 for solid tumors (`{admiralonco}`) - **Additional extensions** - Packages for other therapeutic areas are under development Each extension package builds on `{admiral}` core functionality while providing domain-specific derivations. diff --git a/sdtm/index.qmd b/sdtm/index.qmd index 3c337663..0cbded3d 100644 --- a/sdtm/index.qmd +++ b/sdtm/index.qmd @@ -33,4 +33,6 @@ Each example includes: - Code examples using pharmaverse packages - Expected output and validation checks +All examples use raw datasets from `{pharmaverseraw}` as input, ensuring consistency and reproducibility. + Before working with these examples, it's recommended to review the [`{sdtm.oak}` package documentation](https://pharmaverse.github.io/sdtm.oak/) to understand key concepts such as algorithms, oak_id_vars, and mapping functions. diff --git a/tlg/index.qmd b/tlg/index.qmd index 8f58274b..5072c452 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -97,6 +97,7 @@ These examples create tables directly from analysis datasets using the tradition ### Classic Ecosystem +- **`{rlistings}`** - Create regulatory ready listings for health authority review - **`{rtables}`** - Create complex tables with flexible layouts and nested structures - **`{tern}`** - Analysis and reporting functions specifically designed for clinical trials @@ -123,6 +124,7 @@ All examples use ADaM datasets from `{pharmaverseadam}` as input, ensuring consi - [CDISC Analysis Results Standard](https://www.cdisc.org/standards/foundational/analysis-results-standard) - Official standard documentation - [{cards} package documentation](https://insightsengineering.github.io/cards/) - Learn more about creating ARDs +- [{gtsummary} package documentation](https://www.danieldsjoberg.com/gtsummary) - Learn more about creating summary tables - [{tfrmt} package documentation](https://gsk-biostatistics.github.io/tfrmt/) - Advanced table formatting with ARDs - [{rtables} package documentation](https://insightsengineering.github.io/rtables/) - Comprehensive table creation guide ::: From d57ee41a8d1a6493eb521590e0bf7de8723ec2c2 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 10:24:21 -0600 Subject: [PATCH 19/23] #120 update logging index --- logging/index.qmd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/logging/index.qmd b/logging/index.qmd index 59521dc0..edde100a 100644 --- a/logging/index.qmd +++ b/logging/index.qmd @@ -33,10 +33,18 @@ When implementing logging in clinical trial workflows, consider: - **What to log** - Critical data transformations, decisions, warnings, and errors - **Log format** - Structured, searchable, and human-readable output -- **Sensitive data** - Ensure patient privacy and data security in log files +- **Sensitive data** - Protect patient privacy and data security by being cautious of what gets exposed in log files - **Retention** - Appropriate storage and archival of log files - **Performance** - Balance comprehensive logging with execution efficiency +## Key Packages Used + +- **`{logr}`** - Functions to help create log files +- **`{logrx}`** - Tools to facilitate logging in a clinical environment +- **`{whirl}`** - Provide functionalities for executing scripts in batch and simultaneously getting a log from the individual executions + + + ## Getting Started The logging examples demonstrate: From ab2f543b7e9b2dc7104e7b1cb045cece68b7c65c Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 11:00:51 -0600 Subject: [PATCH 20/23] Update adam/index.qmd Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com> --- adam/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adam/index.qmd b/adam/index.qmd index 92cead7e..ccda9405 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -97,7 +97,7 @@ Each extension package builds on `{admiral}` core functionality while providing - [CDISC ADaM Implementation Guide](https://www.cdisc.org/standards/foundational/adam) - Official ADaM standard documentation and data structure specifications - [{admiral} Documentation](https://pharmaverse.github.io/admiral/) - Comprehensive guide to admiral functions, workflows, and best practices -- [Pharmaverse E2E Clinical Reporting](https://pharmaverse.org/e2eclinical/) - End-to-end examples showing the full pipeline from SDTM to TLGs +- [Pharmaverse E2E Clinical Reporting](https://pharmaverse.org/e2eclinical/) - Complete list of pharmaverse packages supporting the full clinical reporting pipeline - [{admiral} Vignettes](https://pharmaverse.github.io/admiral/articles/) - Detailed articles on specific derivation patterns and use cases ::: From 0378829c81f073a7782bd69fc421622b1392dc39 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 11:03:32 -0600 Subject: [PATCH 21/23] Update esub/index.qmd Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com> --- esub/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esub/index.qmd b/esub/index.qmd index b5f02e57..58170736 100644 --- a/esub/index.qmd +++ b/esub/index.qmd @@ -20,7 +20,7 @@ The following eSubmission examples are available: Successful electronic submissions typically include: -- **Analysis Datasets** - Properly formatted ADaM datasets in SAS transport (XPT) format +- **Datasets** - Properly formatted SDTM and ADaM datasets in SAS transport (XPT) format - **Define.xml** - Machine-readable dataset and variable definitions - **ADRG** - Comprehensive guide to the analysis datasets and derivations - **Analysis Results Metadata (ARM)** - Documentation of analysis outputs From fbe7d243d2da2fabe1aab2bad28a4262fb737461 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 11:04:38 -0600 Subject: [PATCH 22/23] #120 update adam index --- adam/index.qmd | 1 - 1 file changed, 1 deletion(-) diff --git a/adam/index.qmd b/adam/index.qmd index ccda9405..de6ae282 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -98,7 +98,6 @@ Each extension package builds on `{admiral}` core functionality while providing - [CDISC ADaM Implementation Guide](https://www.cdisc.org/standards/foundational/adam) - Official ADaM standard documentation and data structure specifications - [{admiral} Documentation](https://pharmaverse.github.io/admiral/) - Comprehensive guide to admiral functions, workflows, and best practices - [Pharmaverse E2E Clinical Reporting](https://pharmaverse.org/e2eclinical/) - Complete list of pharmaverse packages supporting the full clinical reporting pipeline -- [{admiral} Vignettes](https://pharmaverse.github.io/admiral/articles/) - Detailed articles on specific derivation patterns and use cases ::: ## Common Derivations Across Examples From ef2f5f2ed384ed64a8f2682de9af836195592f48 Mon Sep 17 00:00:00 2001 From: Jeff Dickinson Date: Tue, 20 Jan 2026 13:37:32 -0600 Subject: [PATCH 23/23] #120 update esub index --- esub/index.qmd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/esub/index.qmd b/esub/index.qmd index 58170736..3e3bc2a7 100644 --- a/esub/index.qmd +++ b/esub/index.qmd @@ -10,7 +10,7 @@ The examples demonstrate how to leverage pharmaverse tools to ensure your submis ## Examples -The following eSubmission examples are available: +In our [eSubmission example](esub.qmd), you will find ever-evolving guidance on creating and checking all of the key clinical reporting components of an eSubmission when using R and open source ### Analysis Data Reviewer's Guide @@ -22,9 +22,8 @@ Successful electronic submissions typically include: - **Datasets** - Properly formatted SDTM and ADaM datasets in SAS transport (XPT) format - **Define.xml** - Machine-readable dataset and variable definitions -- **ADRG** - Comprehensive guide to the analysis datasets and derivations -- **Analysis Results Metadata (ARM)** - Documentation of analysis outputs -- **Reviewers Guide** - Documentation to facilitate regulatory review +- **Reviewers Guides** - Comprehensive guide to the tabulation and analysis datasets and derivations +- **Readable Code** - Accessible and understandable TLG programs for key endpoints ## Regulatory Standards @@ -33,12 +32,12 @@ eSubmissions must comply with various regulatory standards and guidance: - **CDISC Standards** - SDTM, ADaM, Define-XML specifications - **FDA Guidance** - Study Data Technical Conformance Guide - **ICH Guidelines** - International standards for data standards and eCTD -- **Pinnacle 21** - Validation and conformance checking ## Key Packages Used - **`{xportr}`** - Creating SAS transport files and performing eSub checks - **`{metacore}`** - Managing metadata and specifications +- **`{metatools}`** - Working with metadata and specifications to format and check data - **Various pharmaverse packages** - Dataset creation and validation ## Getting Started