Re: R-beta: plot with error bars?

Peter Dalgaard BSA (p.dalgaard@kubism.ku.dk)
19 Sep 1997 18:39:29 +0200


To: Bill Simpson <wsimpson@uwinnipeg.ca>
Subject: Re: R-beta: plot with error bars?
From: Peter Dalgaard BSA <p.dalgaard@kubism.ku.dk>
Date: 19 Sep 1997 18:39:29 +0200
In-Reply-To: Bill Simpson's message of Fri, 19 Sep 1997 11:03:55 -0500 (CDT)

Bill Simpson <wsimpson@uwinnipeg.ca> writes:

> 
> I have read the Venables & Smith Notes on R.
> I was wondering if someone could tell me how to make an XY plot with error
> bars.
> 1. x holds x values, y holds y values, ci contains confidence interval
> (error bar stretches from y-ci to y+ci)
> 2. x, y, ucl contains upper confidence limit, lcl contains lower
> confidence limit.  Error bar stretches from lcl to ucl. Need this for
> asymmetrical error bars.

Try refinements of the following:

> x<-rnorm(10)
> y<-rnorm(10)
> plot(x,y)
> arrows(x,y+.1,x,y-.1,length=.05,angle=90,code=3)

- or segments(x,y+.1,x,y-.1), maybe

[actually, we could do with an errbar function that essentially does
the arrows call above]

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=