On 13-04-2010, at 18:25, Sven Schreiber wrote:
Riccardo (Jack) Lucchetti schrieb:
> In my view, NA and NaN are two very different things. As you say, NaN*0
> == NaN, by the definition of NaN. If you restrict the interpretation of
> NA to "unknown numbwer (but still a number)", then NA*0==0 makes sense.
>
I agree!
I don't.
NA == Not Available.
Assume that it is an unknown number. It could be +Inf or -Inf or even NaN.
Even in a numeric context 0*NA = 0 does not make sense.
I feel that The R and Octave result of NA for 0*NA is perfect reasonable (in a numeric
context).
I prefer it.
In a string context 0*Na, R will give an error message.
Berend