Learn R Programming

dtlg (version 0.0.2)

tern_AET01_table: Generate Core Safety Tables (CSR Section 14.3.1) using tern/rtables

Description

tern_AET01_table() produces a consolidated safety summary table using rtables and tern. It mirrors the output and interface of AET01_table(), generating standard adverse event summaries (e.g. death, withdrawal, AESIs) for Clinical Study Reports (CSR) Section 14.3.1.

Usage

tern_AET01_table(
  adsl,
  adae,
  patient_var,
  treat_var,
  aesi_vars,
  aesi_heading = "Total number of patients with at least one",
  indent = "  "
)

Value

A TableTree object from the rtables package.

Arguments

adsl

A subject-level dataset (typically ADaM ADSL).

adae

A dataset of adverse events, preprocessed with AESI flags.

patient_var

A string indicating the subject identifier variable (e.g., "USUBJID").

treat_var

A string indicating the treatment arm variable (e.g., "ARM").

aesi_vars

A character vector of binary AESI flags in adae.

aesi_heading

Ignored (included for interface compatibility).

indent

Ignored (included for interface compatibility).

Details

The function returns a single formatted rtables table summarising core safety endpoints by treatment arm.

Examples

Run this code
tern_AET01_table(
  adsl = adsl,
  adae = aesi,
  patient_var = "USUBJID",
  treat_var = "ARM",
  aesi_vars = c("FATAL", "SER", "SERWD", "SERDSM", "RELSER",
                "WD", "DSM", "REL", "RELWD", "RELDSM", "SEV")
)

Run the code above in your browser using DataLab