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
82 stars 32 forks source link

Formatting Issue in forest plot for Subgroup Analysis - meta package v6.6-0 #54

Closed nelsoncarvasjr closed 1 year ago

nelsoncarvasjr commented 1 year ago

I am writing to report a bug that I encountered while testing the beta version (6.6-0) of the package.

Bug Description: During my evaluation of the forest() function for conducting subgroup analysis, I noticed formatting issues with the forest plot. Specifically, when performing subgroup analysis, the forest plot's formatting appears to be incorrect. The plot is not displaying the data as expected, leading to potential misinterpretations of the results.

For metaadd() Function: The metaadd() function should integrate smoothly within the subgroup on forest plot, providing additional relevant information without compromising the plot's formatting and readability.

Steps to Reproduce:

# R code to reproduce the bug
library(meta)

data(Olkin1995)

m1 <- metabin(ev.exp, n.exp, ev.cont, n.cont,
              data = Olkin1995, subset = c(41, 47, 51, 59),
              sm = "RR", method = "I",
              studlab = paste(author, year))

forest(m1)

m2 <- update(m1,
             subgroup = ifelse(year < 1987, "Before 1987", "1987 and later"),
             print.subgroup.name = FALSE)

forest(m2)

Version Information:

meta package version: 6.6-0 (beta) R version: 4.2.2 Operating system: macOS

guido-s commented 1 year ago

Thank you for pointing out this bug which should be fixed now.

I am not sure how this bug is related to metaadd(). Please open another issue if there is a problem with metaadd().