[Rd] missing() (PR#1096)
Wed, 19 Sep 2001 16:47:40 +0200 (MET DST)
>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:
`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
On Wed, 19 Sep 2001 email@example.com wrote:
> Full_Name: J. R. M. Hosking
> Version: 1.3.0
> OS: Windows 2000
> Submission from: (NULL) (18.104.22.168)
> 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
> if(missing(x)) x<-0
> > test()
>  TRUE
>  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: firstname.lastname@example.org
Brian D. Ripley, email@example.com
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: firstname.lastname@example.org