Skip to content
Prev 426 / 5632 Next

[R-meta] modifying the default forest plot

Am 05.12.17 um 09:58 schrieb Gerta Ruecker:
Just to give some examples. The forest plots in the attached PDF-file 
were generated using the following R commands:

library(meta)

set.seed(666)
##
mean <- 1:5
se.mean <- mean / 10
author <- sample(LETTERS, 5)
year <- 2005 + sample(-10:10, 5)

m1 <- metagen(mean, se.mean, sm = "MD",
 ????????????? studlab = paste(author, year))


pdf("forest18.pdf", width = 9.75, height = 4)
##
forest(m1)
forest(m1, sortvar = -TE)
forest(m1, sortvar = year)
forest(m1, xlab = "Estimated Effect Size")
forest(m1, test.overall = TRUE, colgap.forest.left = "2cm")
forest(m1, layout = "JAMA")
forest(m1, layout = "RevMan5")
##
dev.off()


You can use the arguments 'leftcols' and 'rightcols' to add / remove 
columns from the left and right side of the forest plot.

Best wishes,
Guido