library(dplyr, warn.conflicts = FALSE)
tbl_listing_ex1 <-
head(df_adverse_events, n = 10) %>%
select(system_organ_class, adverse_event, grade, drug_attribution, patient_id) %>%
arrange(adverse_event, desc(grade)) %>%
tbl_listing(group_by = system_organ_class) %>%
bold_labels()
set.seed(11234)
tbl_listing_ex2 <-
df_patient_characteristics %>%
dplyr::slice_sample(n = 10) %>%
select(patient_id, status, discontinued, off_trt_ae) %>%
tbl_listing() %>%
as_gt() %>%
gt::opt_row_striping()
Run the code above in your browser using DataLab