Re: [R] integer ranges in R vs C and Java

2009-05-02 Thread Saptarshi Guha
> You've hit on the reason -- representation of NA > > src/main/arithmetic.c:157:    R_NaInt = INT_MIN; Aha! Yes, I missed that. > > (R-devel seems more appropriate for this question). Yes, i was not sure. Thank you Saptarshi __ R-help@r-project.org

Re: [R] integer ranges in R vs C and Java

2009-05-02 Thread Martin Morgan
You've hit on the reason -- representation of NA src/main/arithmetic.c:157:R_NaInt = INT_MIN; (R-devel seems more appropriate for this question). Martin Saptarshi Guha writes: > Hello, > I'm using R-2.9 and have a question about integer ranges. On C, (OS X > platform), > LONG_MIN and LON

[R] integer ranges in R vs C and Java

2009-05-02 Thread Saptarshi Guha
Hello, I'm using R-2.9 and have a question about integer ranges. On C, (OS X platform), LONG_MIN and LONG_MAX(from limits.h) correspond to -2147483648(-2^31) and 2147483647 (2^31-1) In Java(1.4), Integer.MIN_VALUE and Integer.MAX_VALUE have the same values. On R, as.integer(2^31-1) is the maximum