Not sure which one you want, but the following should cover it:
R f - function(x) c(x=missing(x), y=exists(y))
R f(1)
x y
FALSE FALSE
R f()
x y
TRUE FALSE
R y - 1
R f()
xy
TRUE TRUE
R f(1)
x y
FALSE TRUE
Andy
From: Talbot Katz
Hi.
I'm having
a bad
programming paradigm. But even an explanation if that's the case would be
appreciated.
-- TMK --
212-460-5430home
917-656-5351cell
From: Liaw, Andy [EMAIL PROTECTED]
To: Talbot Katz [EMAIL PROTECTED],r-help@stat.math.ethz.ch
Subject: RE: [R] Testing for existence inside a function