[R] Request for help about running a loop and reading .NC files

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Mar 24 13:32:27 CET 2020

On Mon, 23 Mar 2020 16:16:42 -0700
Bhaskar Mitra <bhaskar.kolkata using 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
>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,

More information about the R-help mailing list