Re: [Rd] Use of C++ in Packages

2019-03-29 Thread Simon Urbanek
Kevin, > On Mar 29, 2019, at 17:01, Kevin Ushey wrote: > > I think it's also worth saying that some of these issues affect C code > as well; e.g. this is not safe: > >FILE* f = fopen(...); >Rf_eval(...); >fclose(f); > I fully agree, but developers using C are well aware of the ne

Re: [Rd] Use of C++ in Packages

2019-03-29 Thread Gabriel Becker
Hi Jim (et al.), Comments inline (and assume any offense was unintended, these kinds of things can be tricky to talk about). On Fri, Mar 29, 2019 at 8:19 AM Jim Hester wrote: > First, thank you to Tomas for writing his recent post[0] on the R > developer blog. It raised important issues in inte

Re: [Rd] default for 'signif.stars'

2019-03-29 Thread Abs Spurdle
> If we were to invent lm() now, how would we solve the problem of big P? > I don't think we would use stars. Assuming that this is a good idea in the first place, here's a simple solution, in the context of backward selection. One could sort the terms, from lowest p-value to highest p-value. If

Re: [Rd] Use of C++ in Packages

2019-03-29 Thread Kevin Ushey
I think it's also worth saying that some of these issues affect C code as well; e.g. this is not safe: FILE* f = fopen(...); Rf_eval(...); fclose(f); whereas the C++ equivalent would likely handle closing of the file in the destructor. In other words, I think many users just may not b

Re: [Rd] Use of C++ in Packages

2019-03-29 Thread Simon Urbanek
Jim, I think the main point of Tomas' post was to alert R users to the fact that there are very serious issues that you have to understand when interfacing R from C++. Using C++ code from R is fine, in many cases you only want to access R data, use some library or compute in C++ and return resu

Re: [Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread Ben Bolker
I suspect that the issue is addressed (obliquely) in the examples, which shows that variables with spaces in them (or otherwise 'non-syntactic', i.e. not satisfying the constraints of legal R symbols) can be handled by protecting them with backticks (``) ## using non-syntactic names: refo

Re: [Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread J C Nash
The main thing is to post the "small reproducible example". My (rather long term experience) can be written if (exists("reproducible example") ) { DeveloperFixHappens() } else { NULL } JN On 2019-03-29 11:38 a.m., Saren Tasciyan wrote: > Well, first I can't sign in bugzilla myse

Re: [Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread Saren Tasciyan
Well, first I can't sign in bugzilla myself, that is why I wrote here first. Also, I don't know if I have the time at the moment to provide tests, multiple examples or more. If that is not ok or welcomed, that is fine, I can come back, whenever I have more time to properly report the bug. I di

[Rd] Use of C++ in Packages

2019-03-29 Thread Jim Hester
First, thank you to Tomas for writing his recent post[0] on the R developer blog. It raised important issues in interfacing R's C API and C++ code. However I do _not_ think the conclusion reached in the post is helpful > don’t use C++ to interface with R There are now more than 1,600 packages o

Re: [Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread Martin Maechler
> Saren Tasciyan > on Thu, 28 Mar 2019 17:02:10 +0100 writes: > Hi, > I have found a bug in reformulate function and have a solution for it. I > was wondering, where I can submit it? > Best, > Saren Well, you could have given a small reproducible example depict

[Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread Saren Tasciyan
Hi, I have found a bug in reformulate function and have a solution for it. I was wondering, where I can submit it? Best, Saren -- Saren Tasciyan /PhD Student / Sixt Group/ Institute of Science and Technology Austria Am Campus 1 3400 Klosterneuburg, Austria __

Re: [Rd] default for 'signif.stars'

2019-03-29 Thread Andrew Robinson
Hi Martin, I take your point - but I'd argue that significance stars are a clumsy solution to the very real problem that you outline, and their inclusion as a default sends a signal about their appropriateness that I would prefer R not to endorse. My preference (to the extent that it matters) wou