This function adds information about missing and non-missing data counts to a gtsummary table. It can also apply custom statistics by group and modify the table body with an external function.
add_missing_info(
base_table,
show_missing_data,
var_group = NULL,
by_group = FALSE
)A gtsummary table object.
Logical. If TRUE, shows the number of non-missing and missing values with percentages.
If FALSE, shows only non-missing values.
Optional. A grouping variable name. If not NULL, additional stats are added by group.
A boolean (default is FALSE) to analyse by group.
A gtsummary table object with missing value information and modifications applied.