[R] noncommutative addition: NA+NaN != NaN+NA

Bernardo Rangel Tura tura at centroin.com.br
Tue Sep 7 16:38:30 CEST 2004


At 06:17 07/09/2004, you wrote:


>Hi guys.
>
>Check this out:
>
>>  NaN +NA
>[1] NaN
>>  NA + NaN
>[1] NA
>
>I thought "+" was commutative by definition.   What's going on?

In my version, both cases is NA:

 >  NaN +NA
[1] NA
 > NA + NaN
[1] NA
 >
R.version
          _
platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
status
major    1
minor    9.1
year     2004
month    06
day      21
language R




Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil  


More information about the R-help mailing list