Skip to content
Prev 167187 / 398502 Next

Value Lookup from File without Slurping

you might try to iteratively read a limited number of line of lines in a
batch using readLines:

# filename, the name of your file
# n, the maximal count of lines to read in a batch
connection = file(filename, open="rt")
while (length(lines <- readLines(con=connection, n=n))) {
   # do your stuff here
}
close(connection)

?file
?readLines

vQ
Gundala Viswanath wrote: