I have a function which creating a table like below and i want to add one more header to the table and merger the header at the first column.
i want to export this table to excel thats why looking for another solution , tried with flextable already
tbl_summmary <-
tibble(
outcome = c("A (%)", "B (%)", "C (%)", "D (%)", "Total (n)"),
group_1 = c(.25, .25, .125, .325, 10),
group_2 = c(.50, 0.0, .325, .125, 20),
group_3 = c(.10, .40, .125, .325, 40))
tbl_summmary %>% as.data.frame()
output should be look like