# \donttest{
# Example 1 -----------------------------------------------------------------
add_overall_ex1 <-
df_adverse_events %>%
tbl_ae_count(
ae = adverse_event,
soc = system_organ_class,
by = grade,
strata = trt
) %>%
add_overall() %>%
modify_header(all_ae_cols() ~ "**Grade {by}**") %>%
bold_labels()
# Example 2 -----------------------------------------------------------------
add_overall_ex2 <-
df_adverse_events %>%
tbl_ae(
id = patient_id,
ae = adverse_event,
soc = system_organ_class,
by = grade
) %>%
add_overall(across = 'by') %>%
modify_header(all_ae_cols() ~ "**Grade {by}**") %>%
bold_labels()
# Example 3 -----------------------------------------------------------------
add_overall_ex3 <-
df_adverse_events %>%
tbl_ae_focus(
id = patient_id,
include = c(any_complication, grade3_complication),
ae = adverse_event,
strata = trt
) %>%
add_overall(across = 'strata')
# Example 4 -----------------------------------------------------------------
add_overall_ex4 <-
df_adverse_events %>%
tbl_ae(
id = patient_id,
ae = adverse_event,
soc = system_organ_class,
by = grade,
strata = trt
) %>%
add_overall(across = 'overall-only') %>%
modify_header(all_ae_cols() ~ "**Grade {by}**") %>%
bold_labels()
# }
Run the code above in your browser using DataLab