[R] How to write output in a specific formate with irregular space
Yihsu Chen
yschen at jhu.edu
Thu May 18 17:46:44 CEST 2006
Dear R users:
My question is how to write output in a specific formate with irregular
spacing?
Say that I have the following DF with three columns (A-C):
A B C
a10 100.0 212
The objective is to write an output file such that column A occupies
1-10 spaces aligned to the left, column B occupies 11-15 spaces aligned
to the right, and finally column C takes 16-25 spaces aligned to left.
In other words, this is what it should be looked like, where the first
row is simply the indices for "space".
1234567890123456789012345
a10 100.0212
Thank you
Yihsu Chen
The Johns Hopkins University
More information about the R-help
mailing list