t_ae_pt_slide: Adverse event table

View source: R/t_ae_pt_slide.R

t_ae_pt_slideR Documentation

Adverse event table

Description

Adverse event table

Usage

t_ae_pt_slide(
  adsl,
  adae,
  arm = "TRT01A",
  cutoff = NA,
  prune_by_total = FALSE,
  split_by_study = FALSE,
  side_by_side = NULL
)

Arguments

adsl

ADSL data set, dataframe

adae

ADAE data set, dataframe

arm

Arm variable, character, "'TRT01A" by default.

cutoff

Cutoff threshold

prune_by_total

Prune according total column

split_by_study

Split by study, building structured header for tables

side_by_side

A logical value indicating whether to display the data side by side.

Value

rtables object

Note

* Default arm variables are set to '"TRT01A"' for safety output, and '"TRT01P"' for efficacy output

Examples


library(dplyr)
# Example 1
adsl <- eg_adsl %>%
  dplyr::mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")))
adae <- eg_adae %>%
  dplyr::mutate(
    TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")),
    ATOXGR = AETOXGR
  )
out <- t_ae_pt_slide(adsl, adae, "TRT01A", 2)
print(out)
generate_slides(out, paste0(tempdir(), "/ae.pptx"))

# Example 2, prune by total column
out2 <- t_ae_pt_slide(adsl, adae, "TRT01A", 25, prune_by_total = TRUE)
print(out2)
generate_slides(out, paste0(tempdir(), "/ae2.pptx"))

autoslider.core documentation built on April 4, 2025, 2:05 a.m.