Skip to content

Quasi-bug in boxplot().

3 messages · Rolf Turner, Peter Dalgaard, Martin Maechler

#
In response to my comment
Brian Ripley wrote
O.K. That's clear enough now.  But ***WHY***?  I.e. why structure the
arguments of boxplot() in this way?  I.e. why put the ... argument
before everything but x, so that partial matching cannot be used on
the rest of the arguments?

					cheers,

						Rolf Turner

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Rolf Turner <rolf at math.unb.ca> writes:
Not quite sure about boxplot.default. In boxplot.formula however,
there's a subset argument that will cause some grief if partially
matched. One other side effect of putting arguments after ... is that
it prevents positional matching, which might be the point in
boxplot.default -- avoid coding like boxplot(x, 1.5, NULL, TRUE, TRUE)
and the ensuing complaints if the argument order gets reshuffled.
#
PD> Rolf Turner <rolf at math.unb.ca> writes:
    >> >  It is defined *not* to work.  The call is
    >> >  
    >> >       boxplot(x, ..., range = 1.5, width = NULL, varwidth = FALSE,
    >> >               notch = FALSE, outline = TRUE, names, boxwex = 0.8, plot = TRUE,
    >> >               border = par("fg"), col = NULL, log = "", pars = NULL,
    >> >               horizontal = FALSE, add = FALSE, at = NULL)
    >> >  
    >> >  and argument after ... are not partially matched.
    >> >  
    >> >  See, e.g. `S Programming' p.40.
    >> 
    >> O.K. That's clear enough now.  But ***WHY***?  I.e. why structure the
    >> arguments of boxplot() in this way?  I.e. why put the ... argument
    >> before everything but x, so that partial matching cannot be used on
    >> the rest of the arguments?

    PD> Not quite sure about boxplot.default. 
I'm sure there:
How else should calls like

    boxplot(rnorm(100), rt(100,df=10), rt(110, df = 4), rcauchy(120))

work?  And these should work if only for S backcompatibility.
Martin

    PD> In boxplot.formula however,
    PD> there's a subset argument that will cause some grief if partially
    PD> matched. One other side effect of putting arguments after ... is that
    PD> it prevents positional matching, which might be the point in
    PD> boxplot.default -- avoid coding like boxplot(x, 1.5, NULL, TRUE, TRUE)
    PD> and the ensuing complaints if the argument order gets reshuffled.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><