[R] Value Lookup from File without Slurping

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Fri Jan 16 12:21:00 CET 2009


r at quantide.com wrote:
> I agree on the database solution.
> Database are the rigth tool to solve this kind of problem.
> Only consider the start up cost of setting up the database. This could
> be a very time consuming task if someone is not familiar with database
> technology.

and won't pay if you want to do the lookup just once.

>
> Using file() is not a real reading of all the file. This function will
> simply open a connection to the file without reading it.
> countLines should do something lile "wc -l" from a bash shell

... and wc knows the count of lines in a file without reading it

vQ




More information about the R-help mailing list