Re: [R] Forestplot

From: francogrex <>
Date: Fri, 21 Dec 2007 13:15:10 -0800 (PST)

Sorry here's the good code:

forestplot=function(mean,std,conf,threshold){ z=-qnorm((1-conf)/2)
CI.H <- mean+z*std # Calculate upper CI CI.L <- mean-z*std # Calculate lower CI plot(mean,1:length(mean),xlim=c(min(CI.L),max(CI.H)),pch=15,cex=1, ylab="",xlab="mean & CIs",main="Forest plot")

arrows(mean,1:length(mean),CI.H,1:length(mean), angle=90,length=0.05)
arrows(mean,1:length(mean),CI.L,1:length(mean), angle=90,length=0.05)

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 21 Dec 2007 - 21:19:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 21 Dec 2007 - 21:30:20 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.