Your problem is that the function read.csv2
uses the function scan()
, which requires you to define which column classes of the file you are importing. You have two options, the first, which I recommend, is that you use another function for reading.
The function I use by default for large files is the read_csv()
package ("readr")
.
If you want to continue with this function you can define the classes with the argument colClasses=v
, which v
is an array with the classes of all the columns of the file you are reading.
Example:
if you have 5 columns in your file, the first as text and the other numeric
read.csv2.ffdf(
file="DM_ALUNO.csv",
sep="|",
first.rows=100000,
colClasses=c("character",rep("numeric",4))
)
Question in English reported
It is not possible to say for sure without the data, but it seems to me that you have to define the parameter
colClasses
manually.– Molx
and how I do it ?
– Ale