Dear List, I am working with a small (3 columns and 9 rows) data table, which contains 9 observations, their mean values and standard deviations (I extracted these data from a huge set and I cannot use the original data). I plotted means (y-axis) and the observations (x-axis) using the " plot() " command. However, I am not sure how to plot the standard deviation data on top of this. This kind of chart will save me time and space so I want to overlay standard deviation values. I appreciate your suggestions in terms of how to do this or using a different type of graph. Thank you, -- BÜLENT ARIKAN, PhD Postdoctoral Scholar Center for Social Dynamics and Complexity & School of Human Evolution and Social Change Arizona State University Tempe - AZ 85287-2402 [[alternative HTML version deleted]]
Tena koe There are many ways. I tend to use the arrows() function. See ?arrows HTH .... Peter Alspach> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Bulent Arikan > Sent: Monday, 28 March 2011 10:45 a.m. > To: r-help at r-project.org > Subject: [R] overlaying > > Dear List, > I am working with a small (3 columns and 9 rows) data table, which > contains > 9 observations, their mean values and standard deviations (I extracted > these data from a huge set and I cannot use the original data). I > plotted means > (y-axis) and the observations (x-axis) using the " plot() " command. > However, I am not sure how to plot the standard deviation data on top > of this. This kind of chart will save me time and space so I want to > overlay standard deviation values. I appreciate your suggestions in > terms of how to do this or using a different type of graph. > > Thank you, > > -- > B?LENT ARIKAN, PhD > Postdoctoral Scholar > Center for Social Dynamics and Complexity & School of Human Evolution > and Social Change Arizona State University Tempe - AZ > 85287-2402 > > [[alternative HTML version deleted]]The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited.
--- On Sun, 3/27/11, Bulent Arikan <bulent.arikan at gmail.com> wrote:> From: Bulent Arikan <bulent.arikan at gmail.com> > Subject: [R] overlaying > To: r-help at r-project.org > Received: Sunday, March 27, 2011, 5:45 PM > Dear List, > I am working with a small (3 columns and 9 rows) data > table, which contains > 9 observations, their mean values and standard deviations > (I extracted these > data from a huge set and I cannot use the original data). I > plotted means > (y-axis) and the observations (x-axis) using the " plot() " > command. > However, I am not sure how to plot the standard deviation > data on top of > this. This kind of chart will save me time and space so I > want to overlay > standard deviation values. I appreciate your suggestions in > terms of how to > do this or using a different type of graph. > > Thank you, > > -- > B?LENT ARIKAN, PhD > Postdoctoral Scholar > Center for Social Dynamics and Complexity & > School of Human Evolution and Social Change > Arizona State University > Tempe - AZ > 85287-2402 ># Usesarrows 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()>