R-alpha: exists returns false for built in functions

Gregory R. Warnes (warnes@biostat.washington.edu)
Wed, 4 Sep 1996 14:01:47 -0700 (PDT)


Date: Wed, 4 Sep 1996 14:01:47 -0700 (PDT)
From: "Gregory R. Warnes" <warnes@biostat.washington.edu>
To: r-testers <r-testers@stat.math.ethz.ch>
Subject: R-alpha: exists returns false for built in functions


The funciton exists() currently returns false for built in functions such 
as gamma(). Splus returns true for these functions, which is more consistent.
For example,

Splus 3.3:
> gamma
function(x)
.Internal(gamma(x), "do_math", T, 131)
> exists("gamma")
[1] T

R alpha 0.10:
> gamma
<primitive: gamma>
> exists("gamma")
[1] FALSE

If exists can be fixed, I can write code to be used in both Splus and R 
that uses builtin functions when they exist and defines them if they are 
not present.  One example is the choose() function, which exists in R, 
but not in Splus.

Greg


-------------------------------------------------------------------------------
    Gregory R. Warnes          | It is high time that the ideal of success
warnes@biostat.washington.edu  |  be replaced by the ideal of service.
                               |                       Albert Einstein
-------------------------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-