Skip to content
Prev 168143 / 398502 Next

strip leading 0's

The only comprehensive way to do this would be to change R's internaal 
print mechanisms.  (Note that changing 0. to . breaks the layout: 
changing '0.' to ' .' would be better.)

But you haven't told use why you would want to do this.  Leaving off 
leading zeroes makes output harder to read for most people, and indded 
leading periods are easy to miss (much easier than failing to see that 
you were asked not to send HTML mail).

It would be easy for the cognescenti to add an option to R, but I 
suspect they all would need a lot of convincing to do so.
On Sat, 24 Jan 2009, Ista Zahn wrote: