I've been trying to load the Fannie Mae loan data in R, which is available in "txt" format from their website (https://loanperformancedata.fanniemae.com/lppub/index.html#) I'm using the data import code provided by them, but I run into an error "cannot allocate vector of size n mb" I'm only trying to read and rbind 4 files as of now (each 600-700mb approx.) but need to do that for many more. I'm using a laptop with 8GB RAM, and 64-bit RStudio. Any suggestions on what to do? The code uses "fread" along with doMC/doParallel, and as i understand thats as efficient as it can be.
Here's the code:
library(doMC)
registerDoMC(30)
Performance_Data <- foreach(k=1:numberofcores, .inorder=FALSE, .combine=rbind,
.packages=c("data.table")) %do% {
Data_P<- fread(Performance[k], sep = "|", colClasses=Performance_ColClasses, showProgress=TRUE)
setnames(Data_P, Performance_Variables)
setkey(Data_P, "LOAN_ID")
}