[R] Loss of precision when importing data into R

Sharpie chuck at sharpsteen.net
Fri Feb 12 08:29:26 CET 2010

Hanke, Alex-2 wrote:
> Hi Listers,
> I can't seem to figure out why I loose precision when I try to import a
> comma delimited file using read.csv or read.table. The fields of interest
> are rounded to one decimal  place.

If the fields of interest are rounded to one decimal place in the file then
that most likely means the loss of precision is occurring in the program you
are using to generate the CSV file-- not in the R importation step.

I seem to remember either Excel or OpenOffice calc having a nasty habit of
exporting to CSV what is *displayed* in the spreadsheet-- not what is
actually entered to each cell.  I.E. the numbers that end up in your file
are subject to the display precision that was set on the cells in your

Hope this helps!

View this message in context: http://n4.nabble.com/Loss-of-precision-when-importing-data-into-R-tp1477818p1478211.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list