[R] How to write output in a specific formate with irregular space

From: Yihsu Chen <yschen_at_jhu.edu>
Date: Fri 19 May 2006 - 01:46:44 EST

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):

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".

a10 100.0212

Thank you

Yihsu Chen
The Johns Hopkins University

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 19 02:03:06 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 19 May 2006 - 04:10:14 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.