My script is the following: library(metafor)
yi<-c(-0.1, 0.2, 0.3, 0.4) sei<-c(0.4, 0.2, 0.6, 0.1) vi<-sei^2 studi<-c("A", "B", "C", "D") eventi.c<-c(10, 5, 7, 6) n.c<-c(11, 34, 25, 20) eventi.a<-c(2, 7, 6, 5) n.a<-c(11, 35, 25, 15) dfs<-rma(yi, vi, method="DL") dfs windows(height=6, width=10, pointsize=10) windowsFonts(B=windowsFont("Bookman Old Style")) forest.rma(dfs, slab=studi, xlim=c(-15, 10), ilab=cbind(eventi.c, n.c, eventi.a, n.a), ilab.xpos=c(-9.5, -8, -6, -4.5), cex=1.2, at=c(-2, -1, 0, 1, 2), family="B", xlab="Hazard Ratio (log scale)", mlab="Random Effects Model", efac=5, col="red", border="red") text(-10, -1.3, paste("Heterogeneity: I-squared=", paste(paste(round(dfs$I2, 2), "%", sep=""), paste("p", round(dfs$QEp, 4), sep="="), sep=", "), sep=""), font=4, cex=1.2, family="B") op<-par(cex=1.2, font=2, family="B", oma=c(0.5, 0.5, 0.5, 0.5), mar=c(0.5, 0.5, 0.5, 0.5)) text(x=c(-9.5, -8, -6, -4.5), 6, c("Events", "N", "Events", "N"), cex=1.2 ) text(c(-8.7, -5.5, 8), 6.5, c("S", "A", "Log")) text(-15, 6, "Trials", pos=4) text(10, 6, "Hazard Ratio [95% CI]", pos=2) par(op) Even if I have specified "col="red", border="red"", color of squares and diamond rests black! Why? Thanks, Paola -- View this message in context: http://r.789695.n4.nabble.com/Change-color-in-forest-rma-metafor-tp3765090p3765090.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.