Preserving large numbers

后端 未结 8 1749
一生所求
一生所求 2020-12-01 18:30

I am trying to read a CSV file that has barcodes in the first column, but when R gets it into a data.frame, it converts 1665535004661 to 1.67E+12.<

8条回答
  •  [愿得一人]
    2020-12-01 19:21

    You can use the numerals arguments when you are doing read.csv. So for example:

    read.csv(x, sep = ";", numerals = c("no.loss")) Where x is your data.
    

    This preserves the value of the long integers and doesn't mess with their representation when you import the data.

提交回复
热议问题