I've been following this thread, and wondering where it might lead.
My (possibly naive) view of these matters is basically logical,
relying on (possibly over-simplified) interpretaions of "NA" and "NaN".
These are that:
"NaN" means "Not a Number", though it can result from a
numerical calculatio
I'm having deja-vu of a similar discussion on R-devel:
https://stat.ethz.ch/pipermail/r-devel/2018-July/076377.html
This was the funniest inconsistency I could find:
> sum(c(NaN,NA))
[1] NaN
> sum(NaN,NA)
[1] NA
THEY'RE IN THE SAME ORDER!!!
The doc in ?NaN has this clause:
In R, basi
On 04/07/18 00:24, Martin Møller Skarbiniks Pedersen wrote:
Hi,
I am currently using R v3.4.4 and I just discovered this:
prod(NA, NaN) ; prod(NaN, NA)
[1] NA
[1] NaN
?prod says:
If ‘na.rm’ is ‘FALSE’ an ‘NA’ value in any of the arguments will
cause a value of ‘NA’ to be retu
Hi,
I am currently using R v3.4.4 and I just discovered this:
> prod(NA, NaN) ; prod(NaN, NA)
[1] NA
[1] NaN
?prod says:
If ‘na.rm’ is ‘FALSE’ an ‘NA’ value in any of the arguments will
cause a value of ‘NA’ to be returned, otherwise ‘NA’ values are
ignored.
So according to the m
4 matches
Mail list logo