HI,
Not sure how you want to align the columns.
If you want to write the columns in fixed width format, you can use,
write.fwf() from library(gdata).
A.K.
- Original Message -
From: sharx
To: r-help@r-project.org
Cc:
Sent: Friday, August 10, 2012 9:39 PM
Subject: [R] Align columns i
On Aug 10, 2012, at 6:39 PM, sharx wrote:
Does anyone know of a way to specify the alignment of individual
columns in a
data frame so that after using write.table the columns are aligned
in the
file?
Do you mean by padding with spaces? set numzer.pad to the desired
width and then perhap
I do not know of any option in write.table() that would allow a
variable spacer, such as padding with spaces to make columns centered
or right aligned. Everything is just separated somehow. You could
look at ?format or ?sprintf which have padding/alignment options.
Once you had properly padded ch
3 matches
Mail list logo