Learn R Programming

dtlg (version 0.0.2)

AET01_table: Generate Core Safety Tables for Clinical Study Reports

Description

AET01_table() produces and combines the main safety summary tables typically found in Section 14.3.1 of a Clinical Study Report (CSR). It calculates patient counts and event totals for deaths, AE-related withdrawals, total AEs, and adverse events of special interest (AESIs).

Usage

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

Value

A merged data.table summarising the main safety outcomes.

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

Optional character string used as a heading in the AESI block.

indent

A string used to indent AESI row labels (default is 2 spaces).

Examples

Run this code
AET01_summary <- 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")
)
print(AET01_summary)

Run the code above in your browser using DataLab