gender <- c("male","female","female","male",NA)
test_resurt <- c("positive","negative",NA,"positive","negative")
homeless <- factor(c("yes","no","yes","no","no"))
df <- as.data.frame(cbind(gender,test_resurt,homeless))
df
#> gender test_resurt homeless
#> 1 male positive 2
#> 2 female negative 1
#> 3 female <NA> 2
#> 4 male positive 1
#> 5 <NA> negative 1
library(gtsummary)
tbl <-tbl_summary(df)
如何在不使用 gtsummary 包的情况下制作汇总表?