I'm using the Metafor package to plot forest plots and I was wondering if anyone knew a way to omit the upper and lower CIs from the text annotations, for example where one group is a reference and outcome is fixed at 1.
Here is an example:
library(metafor)
par(mar=c(5,4,1,2))
forest(x = c(1, 0.9, 1.1),
ci.ub = c(1, 0.98, 1.18),
ci.lb = c(1, 0.82, 1.02),
refline = 1)
I would like to remove [1.00, 1.00] from the Study 1 row only, leaving just 1.00.
The only possibility I can think of would be to plot something in white over the top of these, but this would be fiddly, and I have a large complex plot with many groups.
You could play around with the graph produced by the call to the
forest
function, removing the annotation on the right-hand side with the optionannotate = FALSE
. After that, you could opt to add your own text with the functiontext
(with limited possibilities) like in the code below.This yields the following graph: