From nikko at hailmail.net  Wed Sep 30 20:29:06 2009
From: nikko at hailmail.net (Nicholas Lewin-Koh)
Date: Wed, 30 Sep 2009 11:29:06 -0700
Subject: [Rd] buglet in is.na?
Message-ID: <1254335346.8321.1337412857@webmail.messagingengine.com>

Hi
the following example I think demonstrates the inconsistency
> f<-function(x) x
> length(f)
[1] 1
> is.na(f)
[1] FALSE
Warning message:
In is.na(f) : is.na() applied to non-(list or vector) of type 'closure'

The documentation states:
Arguments
x       an R object to be tested.
value   a suitable index vector for use with x.

And nowhere in the details was it implied (to me anyway) that x could
not be a function
or anything else in R for that matter. Did I miss something?

Nicholas



[Rd] buglet in is.na?
Nicholas Lewin-Koh