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 ...)."

Just one more thing to consider when trying to produce transportable scripts.

Spencer Graves

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to