diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index f346326b..6f64dc44 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -21,10 +21,6 @@ jobs: Rscript -e 'install.packages("fs")' shell: bash - - name: Switch .qmd to .md - run: Rscript R/switch.R - shell: bash - - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 with: diff --git a/R/switch.R b/R/switch.R index 7d029cfe..6ecbefdb 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 + +# Rename all `.qmd` files to `.md` file.rename(all_qmd, all_md) diff --git a/adam/index.qmd b/adam/index.qmd index 9489b895..de6ae282 100644 --- a/adam/index.qmd +++ b/adam/index.qmd @@ -1,3 +1,114 @@ --- 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. + +All examples use SDTM datasets from `{pharmaversesdtm}` as input, ensuring consistency and reproducibility. + +## Examples + +### 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. +::: + +### 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. + +### 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 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. + +## 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, 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 + +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 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 + +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 +- **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. + +## 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/) - Complete list of pharmaverse packages supporting the full clinical reporting pipeline +::: + +## Common Derivations Across Examples + +While each ADaM dataset has unique requirements, several derivation patterns appear across multiple examples: + +- **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 + +These common patterns are demonstrated throughout the examples, showing how `{admiral}` functions can be reused across different dataset types. 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..3e3bc2a7 100644 --- a/esub/index.qmd +++ b/esub/index.qmd @@ -1,3 +1,58 @@ --- 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 + +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 + +- **[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: + +- **Datasets** - Properly formatted SDTM and ADaM datasets in SAS transport (XPT) format +- **Define.xml** - Machine-readable dataset and variable definitions +- **Reviewers Guides** - Comprehensive guide to the tabulation and analysis datasets and derivations +- **Readable Code** - Accessible and understandable TLG programs for key endpoints + +## 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 + +## 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 + +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/inst/WORDLIST b/inst/WORDLIST index 9698f6a0..ffbf07bd 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -16,6 +16,8 @@ adlb ADLB admiraldiscovery admiralonco +admiralophtha +admiralvaccine adpc ADPC adppk @@ -188,6 +190,7 @@ cachem cairo cairoFT callr +callout categorizationvars cdisc CDISC @@ -221,6 +224,7 @@ Creatinine creatu CRF CRP +CSRs css csv ctype @@ -320,6 +324,7 @@ EOSDT eosstt EOSSTT EPI +esub eSub eSubmission eval @@ -392,9 +397,11 @@ htmltools htmlwidgets httpuv IC +ICH iconv ifelse iframe +immunogenicity init inorder inputId @@ -497,6 +504,7 @@ nVersion NXRLT oakidvars OCC +OCCDS occflags OID onco @@ -583,6 +591,7 @@ prgB processx profvis programTOC +programmatically PROJID PROJIDN ps @@ -604,6 +613,7 @@ Rcpp rds reactable readct +reactogenicity readdata readline README @@ -625,6 +635,7 @@ repo reproducibility req requireNamespace +reusability revealjs rex RFENDTC @@ -654,6 +665,7 @@ rv rx SAE SAFFL +SAPs sas SASFL SCRFDT @@ -708,6 +720,7 @@ subperiods SUBPOS substr summarise +Summarization summaryrec suppdm SUPPDM @@ -727,6 +740,7 @@ TESTCD tf tfrmt tformat +tfrmt tgdt tgt thevalidatoR 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..edde100a 100644 --- a/logging/index.qmd +++ b/logging/index.qmd @@ -1,3 +1,57 @@ --- 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** - 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: + +- 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..0cbded3d 100644 --- a/sdtm/index.qmd +++ b/sdtm/index.qmd @@ -1,3 +1,38 @@ --- 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 + +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 d5b03a13..5072c452 100644 --- a/tlg/index.qmd +++ b/tlg/index.qmd @@ -1,3 +1,130 @@ --- 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 showcase **two distinct approaches** for generating publication-quality outputs, working with ADaM datasets as input. + +## Which Approach Should I Use? + +### Analysis Results Datasets (ARDs) 🆕 + +**Best for:** + +- 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 + +**Packages:** `{cards}`, `{tfrmt}`, `{gtsummary}` + +**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 + +------------------------------------------------------------------------ + +### Classic Direct Summarization + +These examples create tables directly from analysis datasets using the traditional single-step approach with `{rtables}` and `{tern}`. + +#### Demographic Tables + +- **[{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 + +### ARD Ecosystem + +- **`{cards}`** - Create and manipulate Analysis Results Datasets following CDISC standards +- **`{tfrmt}`** - Transform ARDs into publication-ready tables with precise formatting control +- **`{gtsummary}`** - Generate listings or summary tables (with or without ARDs) with support for multiple output formats + +### 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 + +### 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. + +## Learn More + +::: {.callout-note} +## Resources + +- [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 +:::