[R] text formatting

stephen bond stenka1 at go.com
Fri Sep 21 17:02:53 CEST 2007


Dear all,

Does R have any functions for C/Fortran style text formatting when a 
number needs to be output right-justified in a fixed length field?

say '%2d %3d %5.3f' 

or like python .rjust(n)  and .zfill(n)

I can do it paste(), but it is very clumsy.

Thank you very much
Stephen



More information about the R-help mailing list