[datatable-help] fread on gzipped files
Nathaniel Graham
npgraham1 at gmail.com
Tue Apr 2 20:30:32 CEST 2013
I have a moderately large csv file that's gzipped, but not in a tar
archive, so it's "filename.csv.gz" that I want to read into a data.table.
I'd like to use fread(), but I can't seem to make it work. I'm currently
using the following:
data.table(read.csv(gzfile("filename.csv.gz","r")))
Various combinations of gzfile, gzcon, file, readLines, and
textConnection all produce an error (invalid input). Is there a better
way to read in large, compressed files?
-------
Nathaniel Graham
npgraham1 at gmail.com
npgraham1 at uky.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20130402/7962b7bb/attachment.html>
More information about the datatable-help
mailing list