Hi Petr, I just needed to add an 'attach/detach' to get it going.
A<-data.frame(x=1:10, y=1:10, erx=rnorm(10)^2, ery=rnorm(10)^2) attach(A) plot(x,y) arrows(x,y,x+erx/10,y, angle=90, length=.1) arrows(x,y,x-erx/10,y, angle=90, length=.1) arrows(x,y,x,y-ery/10, angle=90, length=.1) arrows(x,y,x,y+ery/10, angle=90, length=.1) detach(A) cheers and thanks! Sean On 25/05/06, Petr Pikal <[EMAIL PROTECTED]> wrote: > Hi > > > On 25 May 2006 at 1:08, Tibi Codilean wrote: > > Date sent: Thu, 25 May 2006 01:08:20 +0100 > From: "Tibi Codilean" <[EMAIL PROTECTED]> > To: [email protected] > Subject: [R] plot xy data with error bars > > > Dear All, > > > > I have x,y data with errors associated with both x and y. What would > > be the easiest way of creating plots with both x and y error bars? > > I know there is some function(s) in some package(s) for error bar > plotting but if you want to use your own, use arrows > > A<-data.frame(x=1:10, y=1:10, erx=rnorm(10)^2, ery=rnorm(10)^2) > plot(x,y) > arrows(x,y,x+erx/10,y, angle=90, length=.1) > arrows(x,y,x-erx/10,y, angle=90, length=.1) > arrows(x,y,x,y-ery/10, angle=90, length=.1) > arrows(x,y,x,y+ery/10, angle=90, length=.1) > > HTH > Petr > > > > > > > > > Thanks > > > > ______________________________________________ > > [email protected] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > Petr Pikal > [EMAIL PROTECTED] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
