I should read a big CSV file (with more than 30000 rows and 10000 columns). Somehow I should read data column by column. This is my code:
con<-file("D:\\Data.csv","r")
datalist<-list()
for(spalte in 5:5)
{
for(i in 1:20000)
{
line<-readLines(con,n=1,warn=FALSE)
m<-list(as.integer(unlist(strsplit(line,split=","))))
datalist<-c(datalist,sapply(m,"[[",spalte))
}
}
but this code needs 4 minutes just to read only one column (in this example 5th column). How should I do to make this job faster?