selectors {gtreg}R Documentation

Column Selectors

Description

See the Table modifications article for examples.

Usage

all_ae_cols(overall = FALSE, unknown = FALSE)

all_cols_in_strata(strata)

all_overall_cols()

all_unknown_cols()

Arguments

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

Value

selected columns

Example Output

Example 1

selectors_ex1.png

See Also

gtsummary::all_stat_cols()

Examples


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**"
  )


[Package gtreg version 0.4.0 Index]