Re: [Rd] [PATCH] Fix missing break

2017-07-20 Thread Steve Grubb
On Thursday, July 20, 2017 7:41:00 PM EDT Duncan Murdoch wrote: > Thanks for posting this series of patches. Unfortunately, there's a > good chance they'll get lost in all the traffic on R-devel. If you > don't hear that they've been fixed in the next couple of weeks, could > you post them to bug

Re: [Rd] [PATCH] Fix missing break

2017-07-20 Thread Duncan Murdoch
Thanks for posting this series of patches. Unfortunately, there's a good chance they'll get lost in all the traffic on R-devel. If you don't hear that they've been fixed in the next couple of weeks, could you post them to bugs.r-project.org, and post future patches there as well? In examples

Re: [Rd] [patch] ?confint: "assumes asymptotic normality"

2017-07-20 Thread peter dalgaard
> On 20 Jul 2017, at 19:46 , Scott Kostyshak wrote: > > On Thu, Jul 20, 2017 at 04:21:04PM +0200, Martin Maechler wrote: >>> Scott Kostyshak >>>on Thu, 20 Jul 2017 03:28:37 -0400 writes: >> From ?confint: >>> "Computes confidence intervals" and "The default method assumes >>>

[Rd] [PATCH] Fix status in main

2017-07-20 Thread Steve Grubb
Hello, This is a patch to fix what appears to be a simple typo. The warning says "invalid status assuming 0", but then instead sets runLast to 0. Signed-of-by: Steve Grubb Index: src/main/main.c === --- src/main/main.c (revisio

[Rd] [PATCH] Fix fscanf specifier in InIntegerAscii

2017-07-20 Thread Steve Grubb
Hello, The SMBUF_SIZED_STRING allows fscanf to read upto 511 bytes. The buffer at line 1382 is only 128 bytes. The fscanf format specifier ought to be resized to prevent a stack overrun. Signed-of-by: Steve Grubb Index: saveload.c

[Rd] [PATCH] Fix memory leak in PicTeXDeviceDriver

2017-07-20 Thread Steve Grubb
Hello, This patch fixes a memory leak due to ptd going out of scope before its assigned to dd. Signed-off-by: Steve Grubb Index: src/library/grDevices/src/devPicTeX.c === --- src/library/grDevices/src/devPicTeX.c (revision 72

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
Dear Joris, I’ll be more careful in my wording next time; thanks for the pointer, and thanks for the discussion. This whole process has been quite educational! 😉. I think we’ve reached a consensus here, where the situation as it is right now has been chosen to allow for flexibility of R’s glm()

[Rd] [PATCH] Fix bad free in connections

2017-07-20 Thread Steve Grubb
Hello, There are times when b points to buf which is a stack variable. This leads to a bad free. The current test actually guarantees the stack will try to get freed. Simplest to just drop the variable and directly test if b should get freed. Signed-off-by: Steve Grubb Index: src/main/connec

[Rd] [PATCH] Fix missing break

2017-07-20 Thread Steve Grubb
Hello, There appears to be a break missing in the switch/case for the LISTSXP case. If this is supposed to fall through, I'd suggest a comment so that others know its by design. Signed-off-by: Steve Grubb Index: src/main/builtin.c

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Joris Meys
On Thu, Jul 20, 2017 at 8:32 PM, Harm-Jan Westra wrote: > My apologies if I seemed to ‘blame R’. This was in no way my intention. I > get the feeling that you’re missing my point as well. > I get that now. But you're on R-devel and you started with the claim that R "falsely reports...". That loo

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
Dear Mark, I agree that convergence is a problem that applies to optimization in general, where the function you�re trying to optimize may have more than one local minimum. In your case, you probably would have to try different starting points for the MLE procedure. This should not be the case

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Mark Leeds
Hi Harm-Jan. I've been following this thread to some degree and just want to add that this issue is not specific to the GLM. It's a problem with optimization of functions in general. I was using use Rvmmin with constraints which is an extremely solid optimization package written by John Nash ( use

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
My apologies if I seemed to �blame R�. This was in no way my intention. I get the feeling that you�re missing my point as well. I observed something that I thought was confusing, when comparing two more or less identical methods (when validating the C code), and wanted to make a suggestion as t

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
Dear Simon, Thanks for your response. I have a suggestion that could be non-intrusive, but still provide some additional info to the user. The glm function already checks for collinearity of the input, and you can easily check which covariate was aliased as a result, using summary(model)$ali

Re: [Rd] [patch] ?confint: "assumes asymptotic normality"

2017-07-20 Thread Scott Kostyshak
On Thu, Jul 20, 2017 at 04:21:04PM +0200, Martin Maechler wrote: > > Scott Kostyshak > > on Thu, 20 Jul 2017 03:28:37 -0400 writes: > > >> From ?confint: > > "Computes confidence intervals" and "The default method assumes > > asymptotic normality" > > > For me, a "con

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Joris Meys
On Thu, Jul 20, 2017 at 6:21 PM, Harm-Jan Westra wrote: > Dear Joris, > > > I agree that such a covariate should not be used in the analysis, and > fully agree with your assessment. However, your response assumes that > everybody who uses R knows what they're doing, which is a dangerous > assumpt

[Rd] matrices with names

2017-07-20 Thread William Dunlap via R-devel
How should R deal with matrices that have a 'names' attribute? S (and S+) did not allow an object to have both dims and names but R does. However, some R functions copy the dims but not the names to the returned value and some copy both. I don't see a pattern to it. Is there a general rule for

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Simon Bonner
In defence of Harma-Jan's original post I would say that there is a difference between true convergence and satisfying a convergence criterion. In my view the algorithm has not converged. This is a case of quasi-complete separate -- there are both successes and failures when x13=0 but only fail

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
Dear Joris, I agree that such a covariate should not be used in the analysis, and fully agree with your assessment. However, your response assumes that everybody who uses R knows what they're doing, which is a dangerous assumption to make. I bet there are a lot of people who blindly trust the

Re: [Rd] Wrongly converging glm()

2017-07-20 Thread Joris Meys
Allow me to chime in. That's an interesting case you present, but as far as I'm concerned the algorithm did converge. The estimate of -9.25 has an estimated standard error of 72.4, meaning that frequentists would claim the true value would lie anywhere between appx. -151 and 132 (CI) and hence the

Re: [Rd] Change in print.function between R 3.4.1 and R 3.4.0

2017-07-20 Thread Martin Maechler
> nicola farina > on Thu, 20 Jul 2017 16:51:54 +0200 writes: > Dear all, > I just installed R 3.4.1 and noticed a change in how user-defined functions > are printed. A small example: > string<-"f<-function(x){\n\tx^2\n}" > cat(string,file="tmp00a.R") > source

Re: [Rd] Separate packages per windows subarch in repository

2017-07-20 Thread Iago Mosqueira
I have something working using configure.win, but this changes the executable when the windows version of the package is created via R CMD INSTALL --build. Could there be any way to do so at installation time from the binary package? Thanks, Iago On 20 July 2017 at 16:21, Iago Mosqueira wrote

[Rd] Wrongly converging glm()

2017-07-20 Thread Harm-Jan Westra
Dear R-core, I have found an edge-case where the glm function falsely concludes that the model has converged. The issue is the following: my data contains a number of covariates, one of these covariates has a very small variance. For most of the rows of this covariate, the value is 0, except f

[Rd] Change in print.function between R 3.4.1 and R 3.4.0

2017-07-20 Thread nicola farina
Dear all, I just installed R 3.4.1 and noticed a change in how user-defined functions are printed. A small example: string<-"f<-function(x){\n\tx^2\n}" cat(string,file="tmp00a.R") source("tmp00a.R") f And this is what I see: #R 3.4.0 function(x){ x^2 } #R 3.4.1 function(x){ \tx^2 } Seems

Re: [Rd] Separate packages per windows subarch in repository

2017-07-20 Thread Iago Mosqueira
Thanks. I did not explain clearly that the executables are not compiled during package compilation, apologies. They are compiled beforehand, as they use ADMB (AD Model Builder) and placed in inst/bin/windows. I assume Makefile.win could copy the appropriate one from PKG/bin/$arch to PKG/inst/bin/

Re: [Rd] [patch] ?confint: "assumes asymptotic normality"

2017-07-20 Thread Martin Maechler
> Scott Kostyshak > on Thu, 20 Jul 2017 03:28:37 -0400 writes: >> From ?confint: > "Computes confidence intervals" and "The default method assumes > asymptotic normality" > For me, a "confidence interval" implies an exact confidence interval in > formal statistics

Re: [Rd] Separate packages per windows subarch in repository

2017-07-20 Thread Jeroen Ooms
On Thu, Jul 20, 2017 at 1:55 PM, Iago Mosqueira wrote: > > I maintain a repository of R packages, where some of them contain > executable binaries. I need to separate those compiled for 32 and 64 bit in > Windows. Have a look at the antiword package. It has a simple makevars which builds antiword

Re: [Rd] Separate packages per windows subarch in repository

2017-07-20 Thread Uwe Ligges
On 20.07.2017 13:55, Iago Mosqueira wrote: Hi, I maintain a repository of R packages, where some of them contain executable binaries. I need to separate those compiled for 32 and 64 bit in Windows, but I could not how to do any of the two options I can think of: 1. Have subarch subfolders in

[Rd] Separate packages per windows subarch in repository

2017-07-20 Thread Iago Mosqueira
Hi, I maintain a repository of R packages, where some of them contain executable binaries. I need to separate those compiled for 32 and 64 bit in Windows, but I could not how to do any of the two options I can think of: 1. Have subarch subfolders in PKG/inst/bin to that the right one is installed

Re: [Rd] configure check might fail for texi2any on Solaris

2017-07-20 Thread Gábor Csárdi
Seems like I just need to put /usr/xpg4/bin first in the PATH, that has a feature full grep program, and then the configure test passes. Gabor On Thu, Jul 20, 2017 at 11:19 AM, Gábor Csárdi wrote: > This is R-patched, from 15th of July. I get: > > configure:5117: found /opt/csw/bin/texi2any > co

[Rd] configure check might fail for texi2any on Solaris

2017-07-20 Thread Gábor Csárdi
This is R-patched, from 15th of July. I get: configure:5117: found /opt/csw/bin/texi2any configure:5129: result: /opt/csw/bin/texi2any configure:5141: checking whether texi2any is at least 5.1 configure:5163: result:no However: /opt/csw/bin/texi2any --version texi2any (GNU texinfo) 6.1 Copyrigh

[Rd] [patch] ?confint: "assumes asymptotic normality"

2017-07-20 Thread Scott Kostyshak
>From ?confint: "Computes confidence intervals" and "The default method assumes asymptotic normality" For me, a "confidence interval" implies an exact confidence interval in formal statistics (I concede that when speaking, the term is often used more loosely). And of course, even if a test statis