Re: [R] 1.095e+09 for integers

2009-02-23 Thread Bernardo Rangel Tura
On Sun, 2009-02-22 at 23:42 -0500, Alexy Khrabrov wrote: > I've had a very long file written out by R with write.table, with > fields of time values, converted from POSIXlt as.numeric. Among 2.5 > million values, very few had 6 trailing zeroes, and those were output > in scientific notation

Re: [R] 1.095e+09 for integers

2009-02-22 Thread Prof Brian Ripley
I don't think you had 'integers' but integer-valued doubles: try as.integer to get an integer variable. E.g. x <- 1.1*(10^(1:8)) write.table(data.frame(x, as.integer(x)), "") "x" "as.integer.x." "1" 11 11 "2" 110 110 "3" 1100 1100 "4" 11000 11000 "5" 11 11 "6" 110 110 "7" 1.1e+

[R] 1.095e+09 for integers

2009-02-22 Thread Alexy Khrabrov
I've had a very long file written out by R with write.table, with fields of time values, converted from POSIXlt as.numeric. Among 2.5 million values, very few had 6 trailing zeroes, and those were output in scientific notation as in the subject. Is this the default behavior for long integ