t_dm_slide: Demographic table

View source: R/t_dm_slide.R

t_dm_slideR Documentation

Demographic table

Description

Demographic table

Usage

t_dm_slide(
  adsl,
  arm = "TRT01P",
  vars = c("AGE", "SEX", "RACE"),
  stats = c("median", "range", "count_fraction"),
  split_by_study = FALSE,
  side_by_side = NULL
)

Arguments

adsl

ADSL data set, dataframe

arm

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

vars

Characters of variables

stats

see '.stats' from [tern::analyze_vars()]

split_by_study

Split by study, building structured header for tables

side_by_side

"GlobalAsia" or "GlobalAsiaChina" to define the side by side requirement

Value

rtables object

Note

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

Examples

library(dplyr)
adsl <- eg_adsl
out1 <- t_dm_slide(adsl, "TRT01P", c("SEX", "AGE", "RACE", "ETHNIC", "COUNTRY"))
print(out1)
generate_slides(out1, paste0(tempdir(), "/dm.pptx"))

out2 <- t_dm_slide(adsl, "TRT01P", c("SEX", "AGE", "RACE", "ETHNIC", "COUNTRY"),
  split_by_study = TRUE
)
print(out2)


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