[R-meta] Forest plot size bounds

Erika Zavaleta z@v@|et@ @end|ng |rom uc@c@edu
Thu Jul 30 02:01:44 CEST 2020

Hi everyone,

I am trying to make a forest plot of my data and cases, and I need help figuring out how to remove the horizontal line at the top of the figure that appears above the cases/ below the header. The problem is that I have a large number of cases. With breaks included to accommodate subgroup means, subgroup headers and the grand mean, that horizontal line ends up falling within the rows of cases rather than above them:


It appears there is a limit on how many rows will fit below it. How can I eliminate that line? My code is here if useful:

forest(fullmamm2$yi,fullmamm2$vi, cex=0.55, cex.axis=0.8,xlab="Annual change in migrating fraction", cex.lab=0.8, slab=paste(fullmamm2$comname), annotate=FALSE, rows=c(1:52,55:59), header=FALSE)
res<-rma.mv(yi, vi, mods=~factor(class), random=~1|comname, data=fullmamm2)
preds <- predict(res)
addpoly(preds$pred, sei = preds$se,  mlab = "", col="gray66", cex=0.8,annotate=FALSE)

###fit model in the two subgroups
res.m <- rma(yi, vi, subset=(class=="Mammals"), random=~1|comname, data=fullmamm2)
res.b <- rma(yi, vi, subset=(class=="Birds"), random=~1|comname, data=fullmamm2)

### add summary polygons by group
addpoly(res.m, row=54, cex=0.6, atransf=exp, mlab="", annotate=FALSE)
addpoly(res.b, row= 0, cex=0.6, atransf=exp, mlab="", annotate=FALSE)

###Add text for subgroups
text(10,54, cex=0.7, c("MAMMALS"))
text(10,0, cex=0.7, c("BIRDS"))
text(10,-1, cex=0.7, font=2, c("GRAND MEAN"))



I stand with Black Lives Matter.

Erika Zavaleta
Howard Hughes Medical Institute Professor 
Ecology and Evolutionary Biology Department
University of California
130 McAllister Way
Santa Cruz, CA 95060
Faculty Director,
Doris  <https://conservationscholars.ucsc.edu/>Duke Conservation Scholars Program <https://conservationscholars.ucsc.edu/> | Center to Advance Mentored, Inquiry-based Opportunities (CAMINO) <http://camino.ucsc.edu/> | Conservation Science and Solutions Lab <http://zavaleta.eeb.ucsc.edu/>

“Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.”
Rev. Dr. Martin Luther King, Jr.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20200729/ad808f49/attachment-0001.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 14088 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20200729/ad808f49/attachment-0001.png>

More information about the R-sig-meta-analysis mailing list