Skip to content
Prev 67663 / 398506 Next

Printing integers in R "as is"

Well, you have to convert an integer to character to see it: `as is' is in 
your case 64 0's and 1's.

I very much suspect that you have a double and not an integer:
[1] 1e+05
[1] 100000

so that is one answer: actually use an `integer vector' as you claim.

A second answer is in ?options, see `scipen'.

A third answer is to use sprintf() or formatC() to handle the conversion 
yourself.
On Thu, 14 Apr 2005, Firas Swidan wrote: