increase memory limit in R
memory.limit() #check memory limit memory.limit(size=16000) ### icrease memory to 16000MB ram