missing() (PR#1096)
From the FAQ:
* In S, `missing(ARG)' remains `TRUE' if ARG is subsequently modified;
in R it doesn't.
From ?missing in 1.3.1:
Details:
`missing(x)' is only reliable if `x' has not been altered since
entering the function: in particular it will always be true after
`x <- match.arg(x)'.
My guess is that whatever you were looking at has been changed in the
current version.
On Wed, 19 Sep 2001 hosking@watson.ibm.com wrote:
Full_Name: J. R. M. Hosking Version: 1.3.0 OS: Windows 2000 Submission from: (NULL) (198.81.209.16) R documentation suggests that if a function argument x is omitted, missing(x) should return TRUE even if x is subsequently assigned a value. This happens in S-plus. But in R:
test
function(x){
print(missing(x))
if(missing(x)) x<-0
print(missing(x))
invisible()
}
test()
[1] TRUE [1] FALSE
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._