From spencer.graves at structuremonitoring.com  Mon May 16 12:06:02 2011
From: spencer.graves at structuremonitoring.com (Spencer Graves)
Date: Mon, 16 May 2011 03:06:02 -0700
Subject: [Rd] Add "See Also:  missing" to help('exists')?
In-Reply-To: <19920.58290.687681.804857@stat.math.ethz.ch>
References: <4DCE2F89.2090503@global-analytics.com>	<AF4C61A5-E05A-4FD7-B161-516A234D4F58@comcast.net>	<4DCE69E0.4070107@prodsyse.com>
	<19920.58290.687681.804857@stat.math.ethz.ch>
Message-ID: <4DD0F70A.9060803@structuremonitoring.com>

On 5/16/2011 1:43 AM, Martin Maechler wrote:
>      SpG>         Might it be feasible to add, "See Also: missing"
>      SpG>  to the help page for "exists"?
>
>
>      SpG>         Currently, one can spend hours studying the help
>      SpG>  page for "exists" without getting a clue to the answer
>      SpG>  to the post copied below.
>
> Yes. I've added such a link now...
> though quite disillusioned with a very vague hope that useRs
> would read the help page so thoroughly ...
>
> Martin Maechler, ETH Zurich

Hi, Martin:  Thanks much.  I mentioned this because I have looked in 
"See Also" for that kind of thing in the past.  Of course, I may be the 
only person who does this, so this change might not help anyone else.  
Best Wishes, Spencer

>      SpG>         Thanks, Spencer
>
>
>      SpG>  On 5/14/2011 3:30 AM, David Winsemius wrote:
>      >>
>      >>  On May 14, 2011, at 3:30 AM, utkarshsinghal wrote:
>      >>
>      >>>
>>>    Hi all,
>>>    I want to define a function such that one of its argument if passed
>>> do one
>>>    thing and if not passed do the second thing.
>> ?missing
>>
>>> So basically, I have to check
>>>    whether the argument is passed or not inside the function. I am
>>> trying to
>>>    use 'exists' function to do this.
>>>> f = function(a,b){exists("b")}
>>>> f(a=3, b=4)
>>>    [1] TRUE
>>>    This is working as expected.
>>>    But if I do the following:
>>>> f(a=3)
>>>    [1] TRUE
>>>    Can anybody explain why this function is returning TRUE here.
>>> -- 
>>> Many thanks,
>>> Utkarsh
>>> ...
>> David Winsemius, MD
>> West Hartford, CT



[Rd] Add "See Also: missing" to help('exists')?
Spencer Graves