On Mon, 23 Mar 2020 16:16:42 -0700
Bhaskar Mitra <bhaskar.kolk...@gmail.com> wrote:

> I would appreciate if anyone can suggest how can I modify
>the loop, whereby the loop will continue to run by bypassing those
>particular
>files which it cannot read or if any particular file has an error.

See ?try and ?tryCatch. With `try`, you can use inherits(x,
'try-error') to check whether execution failed. With `tryCatch` you can
choose your own value to return instead of the error object.

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to