Or a simple approach is to use arrows to draw the CI whiskers Example ====================================================================== # Uses arrows to produce confidence intervals for a set of values. low <- c(312.9460, 312.9419, 312.9422, 312.9380 ) mass <- c(312.9476, 312.9435, 312.9438 , 312.9396 ) high <- c(312.9492, 312.9451, 312.9454, 312.9412)
yaxis <- seq(1,4,by=1) plot(x = mass, y = yaxis, pch=17, xlim = c(312.9378,312.9500), axes=FALSE, xlab = 'mass', ylab = '', main = 'Mass/Intensity Problem') labs <- seq(312.8, 312.95, by = 0.0005) axis(1, at = labs, labels = labs) axis(2, at = yaxis, las = 2) arrows(x0 = low, x1 = high, y0 = yaxis, y1 = yaxis, length=0.1, code = 3, col = 4, angle = 90) box() ========================================================================== --- On Fri, 7/24/09, Dieter Menne <dieter.me...@menne-biomed.de> wrote: > From: Dieter Menne <dieter.me...@menne-biomed.de> > Subject: Re: [R] CI wiskers > To: r-help@r-project.org > Received: Friday, July 24, 2009, 11:43 AM > > > > mfreidin wrote: > > > > I have a matrix containing means and CIs (lower and > upper in two columns, > > so three columns for every data point) for several > points. I have to build > > a graph of these means accompained by the CIs (as > wiskers). No problems > > with making the graph of means, but I don't know how > to introduce CIs. > > > > xYplot in package Hmisc (not the uppercase Y) > > Dieter > > > -- > View this message in context: > http://www.nabble.com/CI-wiskers-tp24646309p24646905.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > __________________________________________________________________ [[elided Yahoo spam]] ______________________________________________ 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.