Re: [Rd] truncation/rounding bug with write.csv

2018-03-15 Thread Gregory Michaelson
So, I come in this morning, and I also find that the behavior is not Happening any longer as well. Perhaps it has to do with Memory utilization and some built-in safeguards to avoid Memory Problems by truncating the numerics? It's extermely frustrating that it I can no longer make this happen. O

Re: [Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Joris Meys
My apologies for not including sessionInfo(), and I'm a bit angry at myself for that. Retrying in a fresh session of R, I get different results. More specifically, I get the expected result where accuracy is the same in the first and the last line. As I didn't include my sessionInfo() in my previou

Re: [Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Ista Zahn
I don't see the issue here. It would be helpful if people would report their sessionInfo() when reporting whether or not they see this issue. Mine is > sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Arch Linux Matrix products: default BLAS/LAPACK:

Re: [Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Gregory Michaelson
I ran this code in RStudio Server on a linux machine, but I don’t know the version offhand. I will try to get it tomorrow. Thanks. Thanks, Greg Michaelson www.datarobot.com 704-981-1118 > On Mar 14, 2018, at 4:47 PM, Joris Meys wrote: > > To my surprise, I can confirm on Windows 10 using

Re: [Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Joris Meys
To my surprise, I can confirm on Windows 10 using R 3.4.3 . As tail is not recognized by Windows cmd, I replaced with: system('powershell -nologo "& "Get-Content -Path temp.csv -Tail 1') The last line shows only 7 digits after the decimal, whereas the first have 15 digits after the decimal. I agr

Re: [Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Dirk Eddelbuettel
What OS are you on? On Ubuntu 17.10 with R 3.4.3 all seems well (see below for your example, I just added a setwd()). [ That said, I long held a (apparently minority) view that csv is for all intends and purposes a less-than-ideal format. If you have that much data, you do generally not want to

[Rd] truncation/rounding bug with write.csv

2018-03-14 Thread Gregory Michaelson
Hello, I have looked on https://www.r-project.org/bugs.html , but it seems that this is the only way to do it. The issue is that the precision used by write.csv is on consistant for big files. See the following code: First I create a large dataframe filled with random uniform values. Then I wri