How do I read large numbers precisely in R and perform arithmetic on them?

后端 未结 2 1293
我在风中等你
我在风中等你 2021-01-26 14:04

I am reading a csv file with some really big numbers like 1327707999760, but R automatically converts it into 1.32771e+12. I\'ve tried to assign it a double class but it didn\'t

相关标签:
2条回答
  • 2021-01-26 14:38

    Excel allows custom formats: Format/Cells/Custom and enter #0

    0 讨论(0)
  • 2021-01-26 14:47

    That's not large. It is merely a representation problem. Try this:

    options(digits=22)
    

    options('digits') defaults to 7, which is why you are seeing what you do. All twelve digits are being read and stored, but not printed by default.

    0 讨论(0)
提交回复
热议问题