Re: [R-pkg-devel] New test in R-devel causes existing packages to fail: "Error: connections left open"

2018-08-28 Thread David B. Dahl
Okay, Uwe, I will close the connection between examples. Thanks Henrik, Duncan, Gabor, and Uwe for participating in the discussion. -- David On Mon, Aug 27, 2018 at 4:47 PM Uwe Ligges wrote: > > I still do not undertsand why you cannot stop scala and related > connections at the end of each exa

Re: [R-pkg-devel] Trying to work around missing functionality

2018-08-28 Thread J C Nash
Thanks for this. Also Duncan's description of how code in the R directory is executed. I've more or less figured out a workaround. Unfortunately Georgi's solution doesn't quite do the trick. Here is my current understanding and solution. Issue: I want to get root of a function of 1 parameter x,

Re: [R-pkg-devel] Trying to work around missing functionality

2018-08-28 Thread Duncan Murdoch
On 28/08/2018 9:17 AM, J C Nash wrote: Indeed, it appears that globalVariables must be outside the function. However, I had quite a bit of fiddle to get things to work without errors or warnings or notes. While I now have a package that does not complain with R CMD check, I am far from satisfie

Re: [R-pkg-devel] Trying to work around missing functionality

2018-08-28 Thread Georgi Boshnakov
If you don't insist on putting the variable in the global environment, variations of the following give a cleaner solution: TraceSetup_1 <- local({ ifn = 0 igr = 0 ftrace = FALSE fn = NA gr = NA function(ifn=0, igr=0, ftrace=FALSE, fn=NA, gr=NA){ ifn<<- ifn

Re: [R-pkg-devel] Trying to work around missing functionality

2018-08-28 Thread J C Nash
Indeed, it appears that globalVariables must be outside the function. However, I had quite a bit of fiddle to get things to work without errors or warnings or notes. While I now have a package that does not complain with R CMD check, I am far from satisfied that I can give a prescription. I had