Re: [R] 0 * NA

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Mon 13 Jun 2005 - 01:42:35 EST


I believe that's intentional. NA means we don't know what the value is, so just about any operation with NA will result in NA. You might think anything times 0 is 0, but:

> 0*Inf

[1] NaN

and there's no guarantee that the "true" value not observed is not Inf...

Andy

> From: BORGULYA Gábor
>
> Hi list!
>
> Debuging one of my R programs I found:
>
> > 0 * NA
> [1] NA
>
> It this a bug, or intentional? I would expect 0 or 0.0
> depending on the type
> of the NA.
>
> Gabor
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 13 01:47:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:33 EST