search for: 1e111

Displaying 1 result from an estimated 1 matches for "1e111".

Did you mean: 1111
2003 Sep 15
1
Integers in S-Plus and R
I wish to comment on interesting and inconsistent behavior of both S-Plus and R with integers. In R 1.7.1 for Windows, is.integer(2) is FALSE, though is.integer(1:2) and is.integer(max(1:2)) are both TRUE. S-Plus 6.1 produces TRUE for all three cases. Meanwhile, as.integer(1e111) produces NA in R 1.7.1 and 2147483647 in S-Plus 6.1. This behavior is consistent with the documentation in both cases: R says, "The answer will be `NA' unless the coercion succeeds." S-Plus says, "The numbers are truncated (moved to the closest integer ...)." J...