Reputation: 47
I have been trying to combine plots in one image by using par(). I am able to do so for histograms etc., but not for these plots. Do you have any idea why? I tried reading up but did not find any solution. Does it have something with base R (or the graphics package) not being able to handle the plots exported by forest.meta()?
a <- c("a","b","c", "d", "e", "f")
b <- c(1,2,3,4,5,6)
c <- c(2,2,3,4,5,6)
d <- c(4,5,6,7,8,9)
df <- data.frame(a,b,c,d)
library(meta)
metta <- metaprop(event = df$b, n = df$d, studlab = df$a, data = df)
metta2 <- metaprop(event = df$c, n = df$d, studlab = df$a, data = df)
par(mfrow=c(2,1))
meta::forest.meta(metta)
meta::forest.meta(metta2)
Upvotes: 1
Views: 36