ggmeta: Publication-Quality Plots for Meta-Analysis with ggplot2
Abstract
Forest and funnel plots are the standard graphical outputs of evidence synthesis, yet the most widely used R functions draw them directly on the graphics device, which makes them hard to restyle, combine with other figures, or embed in a reproducible workflow. We present ggmeta, a ggplot2 extension that builds forest and funnel plots from meta package objects or from tidy data frames and returns them as ordinary ggplot objects, with each plot component implemented as a separate ggproto layer. The package handles twenty-one summary measures with measure-specific back-transformation, can pool effects from a data frame by the inverse-variance and DerSimonian–Laird methods, handles subgroups and table columns, and provides style presets modelled on JAMA, BMJ, and RevMan 5. We demonstrate ggmeta on five open datasets from published meta-analyses covering risk ratios, odds ratios, mean differences, Fisher-z correlations, and logit proportions. Plotted summaries matched the source objects exactly, the standalone pooling routine agreed with metafor and meta to machine precision, and the drawn coordinates matched the input values. A benchmark against five other R forest-plot tools reports code length, rendering time, and memory use. All code and data are distributed under the GPL (≥3) licence.
// Source
Authors: Hércules Rezende Freitas, Maria Clara Salgado-Ramos
Institutions: Universidade do Estado do Rio de Janeiro