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

2020-03-24 Thread David Pierce via R-help
Hey Bhaskar, Dave Pierce here, the author and maintainer of the ncdf4 package. What platform are you working on? If you work on Linux, I'd be happy to send you a new source tar version of the ncdf4 package I've made that handles this case. It now has a settable parameter in nc_open called "return

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

2020-03-24 Thread Bert Gunter
?tryCatch See also: https://www.r-bloggers.com/error-handling-in-r/ Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Mar 24, 2020 at 5:13 AM Bhaskar Mitra

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

2020-03-24 Thread Ivan Krylov
On Mon, 23 Mar 2020 16:16:42 -0700 Bhaskar Mitra 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 `tr

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

2020-03-24 Thread Bhaskar Mitra
Hello Everyone, I have written a loop which reads hundreds of .nc files and extract information from each .nc file and exports that corresponding information as a csv file. The loop works fine until it encounters a .nc file which it cannot read and the loop stops. I would appreciate if anyone c