Re: [Rd] Determining the exit code of an "almost finished" R script

2019-07-11 Thread Gergely Daróczi
Sorry for the late reply, it took a couple of iterations (and some days off) to find a feasible solution without splitting the helper function into two -- please see below if interested. On Sat, Jun 8, 2019 at 6:50 PM Duncan Murdoch wrote: > > On 08/06/2019 9:55 a.m., Gergely Daróczi wrote: > > O

Re: [Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Duncan Murdoch
On 08/06/2019 9:55 a.m., Gergely Daróczi wrote: On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch wrote: On 08/06/2019 7:42 a.m., Gergely Daróczi wrote: Dear All, I'm using "reg.finalizer" in a function that is to be called in R scripts to do some cleanup on success. I have not found a way to ru

Re: [Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Gergely Daróczi
On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch wrote: > > On 08/06/2019 7:42 a.m., Gergely Daróczi wrote: > > Dear All, > > > > I'm using "reg.finalizer" in a function that is to be called in R scripts > > to do some cleanup on success. I have not found a way to run the function > > only if the scr

Re: [Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Duncan Murdoch
On 08/06/2019 7:42 a.m., Gergely Daróczi wrote: Dear All, I'm using "reg.finalizer" in a function that is to be called in R scripts to do some cleanup on success. I have not found a way to run the function only if the script run without errors, so when the exit code is expected to be 0. What I'

[Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Gergely Daróczi
Dear All, I'm using "reg.finalizer" in a function that is to be called in R scripts to do some cleanup on success. I have not found a way to run the function only if the script run without errors, so when the exit code is expected to be 0. What I've tried is checking "geterrmessage()", but unfort