[R] Quasi-bug in boxplot().
Martin Maechler
maechler at stat.math.ethz.ch
Mon Dec 2 14:15:09 CET 2002
>>>>> "PD" == Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk>
>>>>> on 01 Dec 2002 22:03:34 +0100 writes:
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 <><
More information about the R-help
mailing list