selectors | R Documentation |
See the Table modifications article for examples.
all_ae_cols(overall, unknown)
selects all columns summarizing AE statistics. By default, unknown and overall columns are not selected.
all_cols_in_strata(strata)
selects all columns from specified stratum.
all_overall_cols()
selects all overall columns
all_unknown_cols()
selects all unknown columns
all_ae_cols(overall = FALSE, unknown = FALSE)
all_cols_in_strata(strata)
all_overall_cols()
all_unknown_cols()
overall |
logical indicating whether to include the overall columns. Default is FALSE |
unknown |
logical indicating whether to include the unknown or missing columns. Default is FALSE |
strata |
character vector of the selected stratum |
selected columns
Example 1
gtsummary::all_stat_cols()
selectors_ex1 <-
df_adverse_events %>%
dplyr::mutate(grade = ifelse(dplyr::row_number() == 1L, NA, grade)) %>%
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}**",
all_overall_cols() ~ "**Total**",
all_unknown_cols() ~ "**Unknown Grade**"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.