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
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 > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > R-project.org/posting-guide.html > > >