Displaying 1 result from an estimated 1 matches for "whenread".
Did you mean:
  when_ready
  
2009 Jul 24
1
EOF revisited
...ws:
 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 to read one line at a time,
I wonder how to test for EOF whenreading blocks of,say, 100 lines at a time.
Will the following work ?
 con <- file("MyFle.txt","r")
  repeat {
   line <-  readLines(con,n=100)
   if (length(line) < 100) break
  }
Thank you very much.
Maura
tutti i telefonini TIM!
	[[alternative HTML version deleted]]