stephen bond <[EMAIL PROTECTED]> wrote:
> 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'
?formatC
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not re
?sprintf might be what you want...
/Søren
-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] vegne af stephen bond
Sendt: 21. september 2007 17:03
Til: r-help@r-project.org
Emne: [R] text formatting
Dear all,
Does R have any functions for C/Fortran style text
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
_
3 matches
Mail list logo