From khal@alumni.uv.es  Mon Mar  1 13:53:31 1999
From: khal@alumni.uv.es (Kjetil Halvorsen)
Date: Mon, 01 Mar 1999 14:53:31 +0100
Subject: Inconsistencies with is.function
Message-ID: <36DA9BDA.67F9B953@alumni.uv.es>

> debug(sin)
Error in debug(sin) : argument must be a function
> is.function(sin)
[1] TRUE
> debug("[<-")
Error in debug("[<-") : argument must be a function
> is.function(get("[<-"))
[1] TRUE
> 

The problem having to do with .Primitive functions. R should agree
with itself on what is a function! to work around, I used


is.Primfun <- function(fun) is.function(fun) && is.null(body(fun))

but I'm not sure if that is failsafe.



Kjetil Halvorsen
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Inconsistencies with is.function
Kjetil Halvorsen