Skip to content
Prev 177194 / 398503 Next

Controlling widths in write.fwf()

I was trying to format and write each line while looping over the entire
matrix; which made it terribly slow. Without the loop, it works fine.
Thanks Duncan.


-----Original Message-----
From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] 
Sent: Wednesday, April 15, 2009 10:04 AM
To: Vemuri, Aparna
Cc: r-help at r-project.org
Subject: Re: [R] Controlling widths in write.fwf()
On 4/15/2009 11:45 AM, Vemuri, Aparna wrote:
This took about 1 second here:

writeLines(as.character(1:230000), "C:/temp/test.txt")

I can't see how to make it much faster than that.

Duncan Murdoch
After
lot
http://www.R-project.org/posting-guide.html