Re: R-alpha: missing() bug

Peter Dalgaard BSA (pd@kubism.ku.dk)
Wed, 11 Sep 1996 11:00:49 +0200


Date: Wed, 11 Sep 1996 11:00:49 +0200
Message-Id: <199609110900.LAA01752@bush.kubism.ku.dk>
From: Peter Dalgaard BSA <pd@kubism.ku.dk>
To: Ross Ihaka <ihaka@stat.auckland.ac.nz>
In-Reply-To: Ross Ihaka's message of Wed, 11 Sep 1996 13:58:30 +1200
Subject: Re: R-alpha: missing() bug
	<Pine.SUN.3.91.960910134805.27995B-100000@chekov>

In article <199609110158.NAA21737@stat.auckland.ac.nz> Ross Ihaka
<ihaka@stat.auckland.ac.nz> writes:

> Thomas Lumley writes:
>  > 
>  > In 0.11 missing() does not work correctly in nested functions:
>  > eg:
>  > 
>  > > a<-function (x) {
>  > 	missing(x)
>  > }
>  > > b<-function (x) a(x)
>  > 
>  > > a()
>  > [1] TRUE
>  > > b()
>  > [1] FALSE
>  > 
>  > This is particularly a problem with methods, which don't usually check 
>  > the arguments they pass down to NextMethod()
>  
> This is a nasty one!  The problem is that we have a slightly different
> "missing" because of our different scoping rules.
> 

Um. I don't get it. What's the problem again?

S-PLUS : Copyright (c) 1988, 1995 MathSoft, Inc.
S : Copyright AT&T.
Version 3.3 Release 1 for Sun SPARC, SunOS 5.3 : 1995 
Working data will be in .Data 
> a<-function (x) missing(x)
> a()
[1] T
> b<-function (x) a(x)               
> b()
[1] F
> 

Am I going blind or isn't S doing exactly the same thing?

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