multithreading - Can I read 1 big CSV file in parallel in R? -
this question has answer here:
i have big csv file , takes ages read. can read in parallel in r using package "parallel" or related? i've tried using mclapply, not working.
based upon comment op, fread
data.table
package worked. here's code:
library(data.table) dt <- fread("myfile.csv")
in op's case, read in time 1.2gb file read.csv
took 4-5 minutes , 14 seconds fread
.
Comments
Post a Comment