I am processing big csv file (~500-700MB), so I am reading them chunk by chunk. I tried read.csv() function but it is very slow as number to rows to skip increases, so I found data.table::fread()
a much faster way to read a file.(R-Blogger,and stackOverflow) but when I am reading a 60MB csv
file with fread() it works fine but when I tried it on a bigger file (~450MB) of same type it shows R Session Aborted
both files have same structure, it only differs in size. I am not able to understand why it is not working as people are reading even bigger size file with it.
Here is my code snippet-
library(data.table)
ffName = "Bund001.csv"
s<- Sys.time()
ColNamesVector <<- c("RIC","Date","Time","GMT_Offset","Type","Price","Volume","Bid_Price","Bid_Size","Ask_Price","Ask_Size","Qualifiers")
rawData <- fread(ffName,sep=",",nrows = 100000,skip = 400000,col.names = ColNamesVector)
print(Sys.time()-s)