Le 17/02/2020 à 17:50, Tomas Kalibera a écrit :
On 2/17/20 5:36 PM, Serguei Sokol wrote:
Hi,

A colleague of mine has spotted me a passage of the doc ?option talking about Inf and NaN check in 'matprod=default' section:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/options.html

I am wondering if NA should be mentioned too as the check seems to include this "value" too. NA being different from Inf and NaN it is worth mentioning, isn't it?

Yes, NA is handled, too. NA is one of NaN values for the purpose of this text
Thanks for clarification. It was not clear for me from the text itself.

(and it is also implemented that way, see ?NaN).
 Indeed, the text of ?NaN says "... systems typically have
     many different NaN values.  One of these is used for the numeric
     missing value ‘NA’, and ‘is.nan’ is false for that value."
However, R can return both NA and NaN symbols, e.g.

> mean(c(1, NA))
[1] NA
> mean(c(1, NaN))
[1] NaN

which does not help to understand their relationship. That's why I continue to think that it would be clearer to mention NA explicitly in option(matprod=default). It could be a phrasing like "... ensure correct propagation of Inf and NaN (including NA) ..."

Best,
Serguei.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to