Re: [R] EOF revisited

2009-07-24 Thread Steve Lianoglou
Hi, On Jul 24, 2009, at 11:12 AM, wrote: I learnt from this forum to test for EOF reached with fiunction readLines as follows: con <- file("MyFle.txt","r") repeat { line <- readLines(con,n=1) if (length(line) == 0) break } It works fine if I read one line at a time. Since now I hav

[R] EOF revisited

2009-07-24 Thread mauede
I learnt from this forum to test for EOF reached with fiunction readLines as follows: con <- file("MyFle.txt","r") repeat { line <- readLines(con,n=1) if (length(line) == 0) break } It works fine if I read one line at a time. Since now I have a huge file so that it would take forever