Generate flextable for preview first page

slides_preview(x)

Arguments

x

rtables or data.frame

Value

A flextable or a ggplot object depending to the input.

Examples

# Example 1. preview table
library(dplyr)
adsl <- eg_adsl
t_dm_slide(adsl, "TRT01P", c("SEX", "AGE")) %>% slides_preview()

A: Drug X

B: Placebo

C: Combination

All Patients

Sex

F

79 (59%)

82 (61.2%)

70 (53%)

231 (57.8%)

M

55 (41%)

52 (38.8%)

62 (47%)

169 (42.2%)

Age

Median

33.00

35.00

35.00

34.00

Min - Max

21.0 - 50.0

21.0 - 62.0

20.0 - 69.0

20.0 - 69.0