Re: [R] file input with readLines

2011-10-04 Thread Uwe Ligges
On 03.10.2011 19:19, Cable, Sam B Civ USAF AFMC AFRL/RVBXI wrote: I am using readLines to read a fairly large ASCII file. readLines reads a fixed number of lines, then other R code processes the data, then readLines reads the same number of lines again, then other R code processes the data, th

Re: [R] file input with readLines

2011-10-03 Thread R. Michael Weylandt
If you are using rbind() at each iteration, that can slow things down greatly. Look up a document called the R Inferno which discusses this in great detail in circle 2. Michael Weylandt On Mon, Oct 3, 2011 at 2:26 PM, Cable, Sam B Civ USAF AFMC AFRL/RVBXI wrote: > More on my previous question ..

Re: [R] file input with readLines

2011-10-03 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
More on my previous question ... I have put in timing statements to try to get a better idea of where the problem is, like so: conn<-file('filename','r') for (chunk in 1:10) { print(paste('begin read at',date())) Lines<-readLines(conn,n=25) print(paste('begin processing at',date()))