Skip to content
Prev 20087 / 63424 Next

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

On Tue, 4 Apr 2006, Antonio, Fabio Di Narzo wrote:

            
All arithmetic operatiosn on *logicals* are coerced to numeric, so if you 
have two logical NAs and add them you get a numeric NA.

This isn't anything special about NAs, since you would get the same 
conversion for TRUE+TRUE, and you would not get the same conversion for 
two character NAs

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle