December 2021

Welcome

Outline

In this workshop, we have three parts:

  • Delivering TLFs in CSR (Yilong Zhang)
    • Session 1 (45 min)
    • Break and/or Exercise (20 min)
    • Session 2 (45 min)
    • Break (10 min)
  • Clinical trial project (Nan Xiao)
    • Session 3 (30 min)
    • Break (10 min)
  • eCTD submission package (Nan Xiao)
    • Session 4 (40 min)
    • Q&A (10 min)

Disclaimer

  • All opinions expressed are those of the presenter and not Merck Sharp & Dohme Corp., a subsidiary of Merck & Co., Inc., Kenilworth, NJ, USA.

  • Some slides need to be scrolled down to see the full content.

Training objective

  • Learning how to create tables for clinical study reports.
  • Learning how to organize a clinical development project.
  • Learning how to prepare eCTD submission package to FDA.

The toolchain, process, and formats may be different in different organizations. We only provide a recommended way to address them.

Acknowledgement

  • Team members from Merck & Co.
  • Contributors of the training materials.
    • Please consider submitting issues or PR in the repo.
  • R Consortium
    • R validation hub
    • Submission working group
    • R Tables for Regulatory Submission (RTRS) working group
    • Please consider to join and contribute to a working group.
  • ASA Princeton-Trenton Chapter
    • Please consider to be a member of our chapter.

Preparation

In this workshop, we assume you have some R programming experience and clinical development knowledge.

  • Data manipulation: tidyverse, dplyr, tidyr, ggplot2 etc.
  • ADaM data: adsl, adae etc.
install.packages(c(
  "tidyverse", # Data manipulation
  "r2rtf",     # TLF generation
  "pkglite"    # eCTD submission
))

Resource

Philosophy

We share the same philosophy described in Section 1.1 of R Packages book and quote here.

  • “Anything that can be automated, should be automated.”
  • “Do as little as possible by hand. Do as much as possible with functions.”
  • “The goal is to spend your time thinking about what you want to do rather than thinking about the minutiae of package structure.”

Delivering TLFs in CSR

ICH E3 guidance

The ICH E3: structure and content of clinical study reports provide guidance to assist sponsors in the development of a CSR.

In a CSR, most of TLFs are located in

  • Section 10: Study patients
  • Section 11: Efficacy evaluation
  • Section 12: Safety evaluation
  • Section 14: Tables, Figures and Graphs referred to but not included in the text
  • Section 16: Appendices

Datasets

Tools

  • tidyverse: a collection of R packages to simplify the workflow to manipulate, visualize and analyze data in R.

  • r2rtf: an R package to create production-ready tables and figures in RTF format.

r2rtf introduction

Motivation

In the pharmaceutical industry, RTF/Microsoft Word play a central role in preparing clinical study reports

Different organizations can have different table standards

  • E.g., Table layout, Font size, Border type, Footnote, Data source

  • r2rtf is an R package to create production-ready tables and figures in RTF format.

r2rtf is designed to:

  • provide simple “verb” functions that correspond to each component of a table, to help you translate a data frame to a table in RTF format;
  • enable pipes (%>%);
  • only focus on the table format.
    • Data manipulation and analysis should be handled by other R packages. (e.g., tidyverse)

Workflow

Before creating an RTF table, we need to:

  • Figure out table layout.

  • Split the layout into small tasks in the form of a computer program.

  • Execute the program.

Minimal example

r2rtf is designed to enable pipes (%>%).

head(iris) %>%
  rtf_body() %>%           # Step 1 Add table attributes
  rtf_encode() %>%         # Step 2 Convert attributes to RTF encode
  write_rtf("minimal.rtf") # Step 3 Write to a .rtf file

Package overview

r2rtf package provides the flexibility to customize table appearance for

  • Table component: title, column header, footnote, etc.
  • Table cell style: size, border type, color, font size, text color, alignment, etc.
  • Flexible control: the specification of the cell style can be row or column vectorized.
  • Complicated format: pagination, section grouping, multiple table concatenations, etc.

r2rtf package also provides the flexibility to convert figures in RTF format.

Simple example: adverse events

r2rtf only focus on table format. Data manipulation and analysis should be handled by other R packages. (e.g., tidyverse)

Function summary

r2rtf provides simple “verb” functions that correspond to each component of a table, to help you translate data frame to tables in RTF file.

Functions Purpose Optional/required
rtf_page_header() add page header optional
rtf_title() add title optional
rtf_subline() add subject line optional
rtf_colheader() add column header optional
rtf_body() add table body required
rtf_footnote() add footnote optional
rtf_source() add data source optional
rtf_page_footer() add page footer optional
rtf_encode() convert table into rtf code required
write_rtf() write rtf code into .rtf file required

Function illustration