Reputation: 2314
This reference https://www.r-bloggers.com/efficiency-of-importing-large-csv-files-in-r/ compares reading a file using fread versus ffdf. I am currently trying to read a csv file that is abour 60GB while my memory available on RAM is 16GB. It takes about 2 hours to do so. Would you recommend a faster way?
Upvotes: 0
Views: 2390
Reputation: 141
disk.frame can chunk the file into smaller parts, uses fst format and you can use data.table or dplyr syntax.
install.packages("disk.frame")
see here for more info: https://diskframe.com/#:~:text=frame%7D%20is%20an%20R%20package,to%20be%20processed%20by%20R.
Upvotes: 0
Reputation: 416
bigmemory
works in this situation.
library(bigmemory)
library(biganalytics)
x <- read.big.matrix("airline.csv", type="integer", header=TRUE,
backingfile="airline.bin",
descriptorfile="airline.desc",
extraCols="Age")
Upvotes: 1
Reputation: 11
Use Data.Table Package.
Seems to be faster Function Fread.
Function:
"File Name"<- fread("Uploadfile.txt", header = TRUE, colClasses = "character")
Upvotes: 0