Skip to content
Prev 22429 / 398502 Next

write.table() adds unnecessary spaces to right align integer column

On Tue, 6 Aug 2002, Henrik Bengtsson wrote:

            
Well, that's not really what write.table is for, so the problem is not with
write.table but with your usage of it.  Is 900kB file space important?  If
so, why are you not using compression?

If you don't want a table for human consumption, use e.g.save(compress=TRUE).
And if you want to strip blanks in a text file, use an pipe output
connection and strip them with sed, and then compress the file.