Skip to content
Prev 31407 / 398506 Next

Scanning data files line-by-line

On Wed, 30 Apr 2003 12:45:33 +0000, RAF wrote:

            
Yes, that's your solution.  

con <- file("foo") 

will open the file called foo and attach it to a connection called
con.  You pass con to readLines, and since the file stays open between
calls, you'll get successive lines.  Remember close(con) when you're
done.

Duncan Murdoch