I have a few hundred thousand very small .dat.gz files that I want to read into R in the most efficient way possible. I read in the file and then immediately ag
.dat.gz
R has the ability to read gzipped files natively, using the gzfile function. See if this works.
gzfile
rbindlist(lapply(dat.files, function(f) { read.delim(gzfile(f)) }))