Hello all:
I'm stumped. I would appreciate insight on the following: (S-Plus 6.1 under
winnt)
z is a data.frame. The following boxplots the columns:
>boxplot(z)
because boxplot is (now?) a generic with a method for data.frames. However,
not realizing this, I tried an old trick:
>do.call('boxplot',z)
and got an error saying that "argument 'x' is missing with no default."
Same error for >do.call('boxplot',as.list(z)) and
do.call('boxplot',as(z,'list'))
However, even though z is already a list, as manifested by is.list(z) = T,
>do.call('boxplot',list(z))
works!
I would greatly appreciate an explanation of this (to me) puzzling behavior
(new classes, scope??). Certainly seems to violate the maxim of least
surprise in software design.
Thanks.
Bert Gunter
Biometrics Research RY 70-38
Merck & Company
P.O. Box 2000
Rahway, NJ 07065-0900
Phone: (732) 594-7765
mailto: bert_gunter@merck.com
"The business of the statistician is to catalyze the scientific learning
process." -- George E.P. Box
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may
be confidential, proprietary copyrighted and/or legally privileged, and is
intended solely for the use of the individual or entity named on this message.
If you are not the intended recipient, and have received this message in error,
please immediately return this by e-mail and then delete it.
==============================================================================
|