I am trying to read a very big .csv file, of size around 20G, using the function read.table.ffdf() in the "ff" package, but had trouble in specifying the colClasses option in read.csv().
I have to specify the colClasses option because some columns in the file are labels as very long integers, e.g. with 11 digits. For example, two rows in the file are
86246,205,17,1719,104116343,8435,2013-03-13,12,OZ,1,2.59
86246,205,17,1719,10800749282,8435,2013-03-13,12,OZ,1,2.59
The integer 10800749282 is too large for the type "integer" and can only be handled as either "numeric" or "character". But the value 104116343 in the above row is not large enough, so R by default will treat this column being "integer".
I tried the following but got an error. Does anyone know how to solve this problem? Highly appreciated!
dat <- read.table.ffdf(file="file.csv", FUN = "read.csv", na.strings = "", colClasses="character")
Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered, : vmode 'character' not implemented