add_overall_tbl_ae {gtreg} | R Documentation |
Tabulate Overall Summary
Description
Tabulate Overall Summary
Usage
## S3 method for class 'tbl_ae'
add_overall(x, across = NULL, ...)
## S3 method for class 'tbl_ae_count'
add_overall(x, across = NULL, ...)
## S3 method for class 'tbl_ae_focus'
add_overall(x, across = NULL, ...)
Arguments
x |
Object of class |
across |
Specify the type of overall statistics to include.
|
... |
Not used |
Value
Summary object of same input class
Notes
If the spanning headers are modified prior to the call of add_overall()
,
the ordering of the columns may not be correct.
Example Output
Example 1
Example 2
Example 3
Example 4
Examples
# 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()
[Package gtreg version 0.4.0 Index]