Closed gjones1219 closed 3 years ago
Thanks Grant. Can you please give a reproducible example?
Please feel free to re-open when you've prepared a reproducible example
library(gtsummary)
#> #BlackLivesMatter
survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq) %>%
tbl_svysummary(
by = Survived,
include = c(Class, Survived),
statistic = all_categorical() ~ "{n_unweighted} / {N_unweighted}"
) %>%
as_kable() # converting to kable to display on GH
Characteristic | No, N = 1,490 | Yes, N = 711 |
---|---|---|
Class | ||
1st | 4 / 16 | 4 / 16 |
2nd | 4 / 16 | 4 / 16 |
3rd | 4 / 16 | 4 / 16 |
Crew | 4 / 16 | 4 / 16 |
Created on 2021-04-30 by the reprex package (v2.0.0)
Hello! I am writing to report that when I try to use tbl_summary to calculate unweighted statistics (i.e. {n_unweighted}) it does not work and it only returns the weighted values. Can you please address? Thank you.
Grant