XINLI LI <lihawaii <at> gmail.com> writes:

> 
> Dear R Users:
> 
>        I have the individual mortality rate and 95% CI of 100 hospitals,
> how  to do the  plot with the individual hospital in the Yaxis, and the
> mortality rate and 95% CI in the Xais and a overall mean as a reference
> line?

  Something like

library(plotrix)

plotCI(mortratevec,1:n,li=mort.lo,ui=mort.hi,err="x",axes=FALSE)
axis(side=1)
axis(side=2,at=1:n,label=hospitalnames,padj=0,las=1)
box()
abline(v=meanmort)

 
ggplot2 is another option: more complicated to get working,
but very pretty.  You'll want to look at
geom_point
geom_linerange
coord_flip
geom_hline

______________________________________________
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.

Reply via email to