[R] 0 * NA
Liaw, Andy
andy_liaw at merck.com
Sun Jun 12 17:42:35 CEST 2005
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 at 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
>
>
>
More information about the R-help
mailing list