library(dplyr)
ADSL <- eg_adsl
ADAE <- eg_adae
ADAE <- ADAE %>%
dplyr::mutate(ATOXGR = AETOXGR)
t_ae_summ_slide(adsl = ADSL, adae = ADAE)
# add flag for ae leading to dose reduction
ADAE$reduce_flg <- ifelse(ADAE$AEACN == "DOSE REDUCED", TRUE, FALSE)
t_ae_summ_slide(
adsl = ADSL, adae = ADAE,
dose_adjust_flags = c("reduce_flg"),
dose_adjust_labels = c("AE leading to dose reduction of drug X")
)
# add flgs for ae leading to dose reduction, drug withdraw and drug interruption
ADAE$withdraw_flg <- ifelse(ADAE$AEACN == "DRUG WITHDRAWN", TRUE, FALSE)
ADAE$interrup_flg <- ifelse(ADAE$AEACN == "DRUG INTERRUPTED", TRUE, FALSE)
out <- t_ae_summ_slide(
adsl = ADSL, adae = ADAE, arm = "TRT01A",
dose_adjust_flags = c("withdraw_flg", "reduce_flg", "interrup_flg"),
dose_adjust_labels = c(
"AE leading to discontinuation from drug X",
"AE leading to drug X reduction",
"AE leading to drug X interruption"
)
)
print(out)
generate_slides(out, paste0(tempdir(), "/ae_summary.pptx"))
Run the code above in your browser using DataLab