guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
81 stars 31 forks source link

Heterogeneity stats overlapping with forest plot #39

Closed rafanmir closed 3 years ago

rafanmir commented 3 years ago

Hi, I'm doing a forest plot of correlations, and since I only have 2 columns on the left the heterogeneity stats are overlapping with the x axis of the graph. I couldn't find anything in the help file about how can we move the hetstat line in the graph, the only solution I found was increasing colgap of the left columns but it created a lot of white space. Is there any other way to deal with this issue? Thanks

guido-s commented 3 years ago

I added a new argument addrows.below.overall to add empty rows below the meta-analysis results.

library(meta)

m <- metacor((1:5) / 6, rep(100, 5))

forest(m, text.fixed = "FE model", text.random = "RE model")

forest(m, text.fixed = "FE model", text.random = "RE model", addrows = 2)

forest(m, text.fixed = "FE model", text.random = "RE model",
       label.left = "A", label.right = "B")

forest(m, text.fixed = "FE model", text.random = "RE model",
       label.left = "A", label.right = "B",
       addrows = 3)