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

From: jim holtman <jholtman_at_gmail.com>
Date: Fri 19 May 2006 - 03:51:08 EST

?sprintf

On 5/18/06, Yihsu Chen <yschen@jhu.edu> wrote:
>
> 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
>
> ______________________________________________
> 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
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390 (Cell)
+1 513 247 0281 (Home)

What is the problem you are trying to solve?

	[[alternative HTML version deleted]]

______________________________________________
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 03:57:30 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 - 06:10:08 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.