> How could I check that a CSV can be opened before applying the function,
> and create an empty data.frame for those CSV.
Use tryCatch(). E.g., instead of
result <- read_csv2(file)
use
result <- tryCatch(read_csv2(file), error=function(e)
makeEmptyDataFrame(conditionMessage(e)))
where
Dear R Users,
I have developed the following code for importing a series of zipped CSV by
parallel computing.
My problems are that:
A) Some ZIP Files (Which contain CSVs inside) are corrupted, and cannot be
opened.
B) After executing parRapply I can only see the last.warning variable error,
f
2 matches
Mail list logo