Skip to content
Prev 20085 / 63424 Next

is.numeric (NA + NA) is TRUE, should be FALSE (PR#8745)

On 4/4/2006 3:38 PM, cfillekes at gmail.com wrote:
But it is the documented thing, so it is not a bug:

"'is.numeric' returns 'TRUE' if its argument is of mode '"numeric"'
      (type '"double"' or type '"integer"') and not a factor, and
      'FALSE' otherwise."

The value is irrelevant.  You probably want to use "is.numeric(x) && 
all(is.finite(x))" to get the result you're expecting.

Duncan Murdoch