Oct 17, 2019

Repetitive Q: Reading Multiple Files in the Zip Folder

Dear Readers,

I always see a repetitive question coming to me and across various forums on how to read multiple files in the zip folder of same separator or multiple separator. Again, here, lets not compromise on speed.


Solution is to use easycsv package in R, which in turn uses data.table package function "fread".


Find below a quick example:

library(easycsv)
## Loading required package: data.table
easycsv::fread_zip("xxxx\\alldata.zip", extension="CSV", sep=",")
 
Additionally, if you want to read and load large files efficiently you can refer to following page:
https://www.kaggle.com/pradeep13/for-r-users-read-load-efficiently-save-time

Happy R Programming!


Views expressed here are from author’s industry experience. Author trains on and blogs Machine (Deep) Learning applications; for further details, he will be available at mavuluri.pradeep@gmail.com for more details.
Find more about author at http://in.linkedin.com/in/pradeepmavuluri

No comments: