[R] Appearance of Forest Plot

Joshua Wiley jwiley.psych at gmail.com
Tue Dec 7 17:25:46 CET 2010


Hi,

Thanks for the example!  What about plotting it to pdf (or you can use
your favorite file format, just switch png(), jpeg(), bmp(), tiff()
for the pdf() call)?

pdf(file = "temp.pdf", width = 14, height = 38)
forest (metaeg,byvar=year)
dev.off()

I attached the PDF result so you could look at it.  As far as I can
tell, forest() does not mess with the par() settings too much, but
slightly resizing things/fiddling with margins did not give me nearly
what I would need to fit something that big on a screen.  From a PDF
or some graphics format though, it is easy to zoom in or out until the
image fits.  An alternative might be to break up the one big plot into
2-3 smaller ones.

Cheers,

Josh

On Tue, Dec 7, 2010 at 4:31 AM, s306 <stephthurston at hotmail.com> wrote:
>
> Hi Josh,
>
> Thank you for your response. I have recreated my issue using the Olkin 95
> data and subgrouping by year of study - I hope it shows where my problem
> lies:
>
>
> library(meta)
>
> data(Olkin95)
>
> metaeg<-metabin(event.e, n.e, event.c, n.c, studlab = author,
> data=Olkin95, method="MH",
> sm="OR", MH.exact=FALSE, RR.cochrane=FALSE, comb.fixed=TRUE,
> comb.random=TRUE,
> title="", complab="", outclab="",
> label.e="Active", label.c="Control",
> print.CMH=FALSE, warn=FALSE)
>
> Olkin95$year<-Olkin95$year
> metaeg$year<-addvar(metaeg,Olkin95,"year",by.y="author")
> as.data.frame(metaeg)
>
> print.meta(metaeg)
> forest (metaeg,byvar=year)
>
> Any ideas would be very much appreciated. Thanks again!
> --
> View this message in context: http://r.789695.n4.nabble.com/Appearance-of-Forest-Plot-tp3075326p3076271.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.



--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.pdf
Type: application/pdf
Size: 112337 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101207/6a56df76/attachment.pdf>


More information about the R-help mailing list