From bolker@zoo.ufl.edu  Fri Jan 25 15:03:13 2002
From: bolker@zoo.ufl.edu (Ben Bolker)
Date: Fri, 25 Jan 2002 10:03:13 -0500 (EST)
Subject: [Rd] Re: [R] How to add error bars to plot(x,y)in R?
In-Reply-To: <Pine.OSF.3.96.1020125102720.8203B-100000@ija.csic.es>
Message-ID: <Pine.LNX.4.30.0201250954360.14931-100000@bolker.zoo.ufl.edu>

On Fri, 25 Jan 2002, Agustin Lobo wrote:

>
> The real solution would be adding this feature as an option
> to plot.

  This is really a philosophical question.  There are several possible
solutions:

 1. tell people (on the list, in a FAQ, or somewhere in the documentation)
that the easiest way to add error bars is to use arrows(...,angle=90)

 2. add a plotCI (or error.bar, or whatever) function that uses arrows(),
possibly with some bells and whistles, to a utility package that users can
get;

 3. ditto, but to the base R package instead;

 4. make error bars an option to plot(), as you suggest.

 The basic problem is "featuritis", and the fact that there are many
different possible ways you might want to add error bars.  Purists would
say that you need only provide simple tools that people can use to do what
they need; some compromise between nothing and everything is usually
better.  I personally prefer solution #3 above, since plotting confidence
intervals seems to be a pretty basic operation, and one that users should
be encouraged to do.  I wonder if there's an object-oriented solution to
this?  An "error" class and a plot.error method?

  Ben

> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
318 Carr Hall                                bolker@zoo.ufl.edu
Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
Box 118525                                   (ph)  352-392-5697
Gainesville, FL 32611-8525                   (fax) 352-392-3704

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: [R] How to add error bars to plot(x,y)in R?
Ben Bolker