Error using ff package Error in ff(initdata = initdata, .. write error)

86 Views Asked by At

i am trying to load a csv file containing : 517 000 line, and only 20 variables, i am using read.table.ffdf, and it gives the error :

Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered,  : 
  write error

i used the line :

dépenses<- read.table.ffdf(
  file="COVID-19_Expenditures_Report.csv", 
  sep=",", 
  VERBOSE=FALSE, 
  header=TRUE, 
  colClasses=NA
)

i have seen similar questions with the same error due to the high number of variables, but mine isn't due to that, as i have previously used the same function to read more variables than 20, successfully.

1

There are 1 best solutions below

2
Merijn van Tilborg On

Try data.table with fread, it loads in your data very fast without any issues.

library(data.table)
depenses <- fread(file="COVID-19_Expenditures_Report.csv", sep=",",  header = T)