Skip to content
Prev 167206 / 398502 Next

Value Lookup from File without Slurping

r at quantide.com wrote:
just for a test:

cat(rep('', 10^7), file='test.txt', fill=1)
library(R.utils)
system.time(countLines('test.txt'))

... and the file is just about 30MB (and it makes no real difference if
it is stuffed with newlines or not).

vQ