Is it possible to create a table of characteristics that would keep the number of unweighted observations (n) followed by the weighted percentage formatted as a combination of the two codes above?
attached the unweighted summary, and the weighted summary. need to keep the unweighted N by the weighted percentage for all categories.[enter image description here](https://i.stack.imgur.com/KV4AL.jpg)
library(gtsummary)
x <- survey::svydesign(~1, data = dsteps_df, weights = ~p_wstep) %>%
tbl_svysummary(
by = p_sexe,
include = c(p_age_4cl),
digits = list(
all_continuous() = 1,
all_categorical() = c(0, 1)
),
statistic = list(
all_continuous() = "{n} ({N_unweighted})",
all_categorical() = "{n} ({N_unweighted})"
)
) %>%
modify_stat(
all_stat_cols() ~ "{p} ({style_percent(p, digits = 1)})"
) %>%
add_overall(last = FALSE) %>%
missing_text("Missing observations") %>%
bold_labels()
x