I have a folder with different csv files (more than 100) and every file is very large in size and takes a lifetime to open. Do you know how can I write a code just to see if the files opens correctly and if not which are the problematic files. I've tried with this but it was not working.
library(data.table)
setwd("Working dir"
files<-list.files(pattern="*.csv")
numfiles <- length(files)
for (i in c(1:numfiles)){
files[i] <- paste(".\\",files[i],sep="")
assign(gsub("[.]csv$","",files[i]),fread(files[i], header=FALSE))
}
Thank you for your help