0

Big integers with many 0 on the right side are automatically converted to scientific format in any kind of output (printing on screen, writing to file, etc):

foo <- 100000
foo 
# [1] 1e+05
write.table(foo)
print(foo)

foo <- foo + 1
foo
# [1] 100001

How to prevent this automatic conversion, to have big integers printed everywhere with whole digits? I am not looking for a kind of answer that have to remember it every time.

Charles
  • 50,943
  • 13
  • 104
  • 142
Ali
  • 9,440
  • 12
  • 62
  • 92
  • 2
    Use `options( scipen = 100 )` or some other big number – Simon O'Hanlon Mar 22 '13 at 23:14
  • @SimonO101 Why not write that up with an example as the answer? – ndoogan Mar 22 '13 at 23:37
  • @ndoogan because I flagged this as an exact duplicate of [this question](http://stackoverflow.com/q/5352099/1478381). I think it should be closed. What do you think? – Simon O'Hanlon Mar 22 '13 at 23:39
  • @SimonO101 I agree. I didn't notice the flag so thought you were quasi-answering with a note. I still don't see a flag, though. How do I find that? – ndoogan Mar 22 '13 at 23:40
  • @ndoogan Well I have to wait for the flag I raised to be approved by someone with higher rep. TBH I'm not sure how it all works but I flagged it for mod attention and the flag should get accepted as helpful/declined in due course and mods may/may not take appropriate action. – Simon O'Hanlon Mar 22 '13 at 23:43
  • @SimonO101 Roger. Maybe you should mention in in the initial note you left along with a link to the duplicate post. That's what it seems like others do. – ndoogan Mar 22 '13 at 23:44
  • 1
    @ndoogan you are right, but the link is here now, buried in amongst all these comments!! :-) – Simon O'Hanlon Mar 22 '13 at 23:45

0 Answers0