>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED]] On Behalf Of Thanjavur 
>Bragadeesh
>Sent: Monday, February 10, 2003 4:08 PM
>To: [EMAIL PROTECTED]
>Subject: [R] help
>
>
>
>Hi,
>
>help.I would like to plot the mean and standard deviation 
>against a factor 
>in the xaxis- in other words I want an errorplot. I also want 
>to put the 
>standard deviation like a "T" on top of a barplot.  How can do 
>this in R
>
>Bragadeesh

Look at the barplot2() function in the gregmisc package on CRAN.

A quick example using barplot2() and faked numbers:


library(gregmisc)
barplot2(c(5, 8, 4, 6, 9), plot.ci = TRUE, ci.l = c(5, 8, 4, 6, 9),
ci.u = c(5.5, 8.3, 4.25, 6.7, 10.5))


This will give you 5 vertical bars, with the upper bounds of the
confidence intervals plotted on top of the bars. Note that I have
specified that the lower bounds are the same as the bar values, which
results in no lower intervals being plotted.  If you want both upper
and lower bounds plotted, use appropriate values for the 'ci.l'
argument.

There are other options for axis configuration, grid lines and so
forth in barplot2() if you should need them.

Hope that helps,

Marc Schwartz

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to