35 lines
776 B
R
35 lines
776 B
R
|
|
||
|
outs<-c("mdi_1_enr","mdi_6_newobs_enr")
|
||
|
|
||
|
|
||
|
## Non-stratified
|
||
|
|
||
|
source("biv_mul.R")
|
||
|
|
||
|
bm_16_tbl_rtf <- file("bm_16_tbl.RTF", "w")
|
||
|
writeLines(bm_16_tbl%>%as_gt()%>%as_rtf(), bm_16_tbl_rtf)
|
||
|
close(bm_16_tbl_rtf)
|
||
|
|
||
|
bm_16_tbl %>% # build gtsummary table
|
||
|
as_gt() %>% # convert to gt table
|
||
|
gt::gtsave( # save table as image
|
||
|
filename = "bm_16_tbl.png"
|
||
|
)
|
||
|
|
||
|
|
||
|
|
||
|
## Stratified by treatment
|
||
|
|
||
|
|
||
|
source("biv_mul_strat.R")
|
||
|
|
||
|
bm_16_tbl_strat_rtf <- file("bm_16_tbl_strat.RTF", "w")
|
||
|
writeLines(bm_16_tbl_strat%>%as_gt()%>%as_rtf(), bm_16_tbl_strat_rtf)
|
||
|
close(bm_16_tbl_strat_rtf)
|
||
|
|
||
|
bm_16_tbl_strat %>% # build gtsummary table
|
||
|
as_gt() %>% # convert to gt table
|
||
|
gt::gtsave( # save table as image
|
||
|
filename = "bm_16_tbl_strat.png"
|
||
|
)
|