I want to output the results of the wonderful gtsummary package for tbl_uvregression by groups with the function "as.forest_plot" https://www.danieldsjoberg.com/bstfun/reference/as_forest_plot.html. The previous example "https://stackoverflow.com/questions/60958953/how-to-summarise-multiple-logistic-regression-models-in-a-table/60959878#60959878" works perfect and i followed their example. However, is it possible to output two groups as a forest plot?
forrest<- as_forest_plot(
df_uv,
col_names = c("estimate","p.value"),
graph.pos = 2,
boxsize = 0.3,
title_line_color = "darkblue",
col = forestplot::fpColors(box = "darkred",lines="black", zero = "gray50"),
shapes_gp = forestplot::fpShapesGp(default = gpar(lineend = "square", linejoin = "mitre", lwd = 2, col = "black")),
box = gpar(fill = "darkred", col = "black"), # only one parameter
txt_gp = fpTxtGp(ticks=gpar(cex=0.9),xlab=gpar(cex=1.2,vjust=3.5)),
zero=1, cex=0.9, lineheight = "auto", colgap=unit(6,"mm"),
lwd.ci=1, ci.vertices=TRUE, ci.vertices.height = 0.4)
This gives me the "Error: x=
must be class 'tbl_regression' or 'tbl_uvregression'"
Thank you very much