I am getting below error when reading first n rows from a big file(around 50 GB) using fread
. Looks like a memory issue. I tried to use nrows=1000
. But no luck. Using linux
file ok but could not memory map it. This is a 64bit process. There is probably not enough contiguous virtual memory available.
Can this below code be replaced with read.csv
with all options as used below? Does it help?
rdata<- fread(
file=csvfile, sep= "|", header=FALSE, col.names= colsinfile,
select= colstoselect, key = "keycolname", na.strings= c("", "NA")
, nrows= 500
)