R-beta: write and dput lose precision

Bill Simpson (wsimpson@uwinnipeg.ca)
Fri, 27 Mar 1998 10:27:48 -0600 (CST)


Date: Fri, 27 Mar 1998 10:27:48 -0600 (CST)
From: Bill Simpson <wsimpson@uwinnipeg.ca>
To: r-help <r-help@stat.math.ethz.ch>
Subject: R-beta: write and dput lose precision

Maybe this is the proper behaviour, but it was puzzling to me.
My original data are recorded to 6 decimal places, and I trust all those
numbers (microsecond timer).

I scan the data in.  Now I use write (or dput) to save them back to
disk. Examining the numbers with an editor I see that a number like
 1.321159
is still the same, but a number like
3195.423362
becomes
3195.423
It seems that write or dput wants the number to have only 7 digits in
total.

I solved this problem by using save/load instead of write/scan or
dput/dget.  I am just reporting this because it seems odd.

Bill Simpson

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._