[R] NAs produced by integer overflow, but only some time ...

Stefan Th. Gries @tgr|e@ @end|ng |rom gm@||@com
Wed May 9 17:05:39 CEST 2018


> You are right that various arithmetic operators map a pair of integer arguments to various type: the power and division operators map them to double precision while the the addition, multiplication, and subtraction operators map them to integer results (giving NA's if the result cannot fit into 32 bits).
Ah, ok, _that_ explains it, thanks a lot, I did not know that, which
is why it never occurred to me to check str(m1)!

> As for table(table(x)) being an unnatural construct, I use it all the time instead of anyDuplicated to see the pattern of duplications.
Thanks for this, too.




More information about the R-help mailing list