Re: R-alpha: is.function(..) 'lies' sometimes ...

Peter Dalgaard BSA (
Fri, 5 Jul 1996 21:50:44 +0200

Date: Fri, 5 Jul 1996 21:50:44 +0200
Message-Id: <>
From: Peter Dalgaard BSA <>
To: Ross & <>
In-Reply-To: Ross &'s message of Mon, 1 Jul 1996 12:43:39 +1200
Subject: Re: R-alpha: is.function(..)  'lies' sometimes ...

In article <> Ross & <> writes:

   (1)  We have fixed is.function.  It was an oversight.

   (2)  The problem

   > z<-"plot"
   > UseMethod(z,x)
   Error in UseMethod(z, x) : first argument must be a method name
   > UseMethod("plot",x)

   is easily fixed.  We just need to evaluate the first argument.

   We can't easily get rid of the need for explicit arguments in
   UseMethod however.  This would require having an explicit list of call
   frames and some knowledge of where the arguments sit in the frame, and
   we don't do things that way.  The present setup bends things about as
   far as they will go without breaking.

Hmm. I wasn't actually arguing that it *was* a problem. Is it? Rather,
I was saying that things that don't behave like function calls
shouldn't have is.function returning true. Just like Lisp, I suppose R
has its uses for "special forms" which may violate things like
argument evaluation, so I see nothing really wrong with the current
behavior of UseMethod, nor with the fact that it does things different
from S.

(Time gap in reply due to the Amsterdam IBC '96)

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (             FAX: (+45) 35327907
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: