[R] Error bars on barplots -- change default return() value !?

Martin Maechler maechler at stat.math.ethz.ch
Wed Sep 15 11:44:23 CEST 1999

    PD> Martin Maechler <maechler at stat.math.ethz.ch> writes:
    >> I've changed barplot() to - accept a "plot = FALSE" argument
    >> (default remains TRUE) - in the above case ``beside = TRUE'' return
    >> a vector of locations for *each* bar (instead of midpoints of group
    >> of "beside-bar"s)
    >> I wonder if we shouldn't even return a matrix of these locations
    >> with the same dimension as the barplot matrix argument.  This matrix
    >> result could still be addressed as a vector (as all matrices can),
    >> but additionally, one could also use apply(<res>, 2, mean) to get
    >> the locations of the mids of each bar group.
    >> Opinions?

    PD> Agree on the last count. I suspect, however, that you might want an
    PD> all.bars=FALSE argument to get the current behavior as default?

The current behavior is
  - not as documented
     (the documentation amounts to saying that you'd get all bar locations)
  - not compatible to the prototype [S, S-plus]

I think we should change the default behavior, therefore
(and if we provide an extra `all.bars' argument,
 it should at least default to TRUE, the new behavior).

I'd argue that the current behavior is a bug...
{R version is still 0.xx, so we should be allowed to change even such things?}

How can we warn users who now use the return value of
barplot(... beside = T) ?

More opinions?
What do users think?
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 at stat.math.ethz.ch

More information about the R-help mailing list