Re: [Rd] [R] Open a file which name contains a tilde

2019-06-08 Thread Rui Barradas
Hello, R 3.6.0 on Ubuntu 19.04. Since no one mentioned it, notice that the tilde in the middle of a string needs to be surrounded by spaces to be expanded. The first code line works as expected, only the second is wrong (buggy). path.expand('a~b') #[1] "a~b" path.expand('a ~ b') #[1] "a /home

[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

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'

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 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