Re: [Rd] establishing a Code of Conduct for R

2017-09-13 Thread Suzen, Mehmet
On 13 September 2017 at 13:22, Brian G. Peterson  wrote:
> I am not an official representative of the R team, so this is only my
> opinion.
>

Thank you.

> It seems to me that you are trying to create a solution to a problem
> which does not exist.

I am not trying to create any solution and not my decision if this is
really needed for r-project. It was just a naive suggestion, c.f,
https://opensource.guide/code-of-conduct/#why-do-i-need-a-code-of-conduct
https://www.contributor-covenant.org/

Best
Mehmet

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] vcov and survival

2017-09-13 Thread Fox, John
Dear Terry,

Even the behaviour of lm() and glm() isn't entirely consistent. In both cases, 
singularity results in NA coefficients by default, and these are reported in 
the model summary and coefficient vector, but not in the coefficient covariance 
matrix:



> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), 
+  data=longley)
> summary(mod.lm)

Call:
lm(formula = Employed ~ GNP + Population + I(GNP + Population), 
data = longley)

Residuals:
 Min   1Q   Median   3Q  Max 
-0.80899 -0.33282 -0.02329  0.25895  1.08800 

Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 88.93880   13.78503   6.452 2.16e-05 ***
GNP  0.063170.01065   5.933 4.96e-05 ***
Population  -0.409740.15214  -2.693   0.0184 *  
I(GNP + Population)   NA NA  NA   NA
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.5459 on 13 degrees of freedom
Multiple R-squared:  0.9791,Adjusted R-squared:  0.9758 
F-statistic: 303.9 on 2 and 13 DF,  p-value: 1.221e-11

> vcov(mod.lm)
(Intercept)   GNP Population
(Intercept) 190.0269691  0.1445617813 -2.0954381
GNP   0.1445618  0.0001133631 -0.0016054
Population   -2.0954381 -0.0016053999  0.0231456
> coef(mod.lm)
(Intercept) GNP  Population I(GNP + Population) 
88.93879831  0.06317244 -0.40974292  NA 
> 
> mod.glm <- glm(Employed ~ GNP + Population + I(GNP + Population), 
+   data=longley)
> summary(mod.glm)

Call:
glm(formula = Employed ~ GNP + Population + I(GNP + Population), 
data = longley)

Deviance Residuals: 
 Min1QMedian3Q   Max  
-0.80899  -0.33282  -0.02329   0.25895   1.08800  

Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 88.93880   13.78503   6.452 2.16e-05 ***
GNP  0.063170.01065   5.933 4.96e-05 ***
Population  -0.409740.15214  -2.693   0.0184 *  
I(GNP + Population)   NA NA  NA   NA
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for gaussian family taken to be 0.2980278)

Null deviance: 185.0088  on 15  degrees of freedom
Residual deviance:   3.8744  on 13  degrees of freedom
AIC: 30.715

Number of Fisher Scoring iterations: 2

> coef(mod.glm)
(Intercept) GNP  Population I(GNP + Population) 
88.93879831  0.06317244 -0.40974292  NA 
> vcov(mod.glm)
(Intercept)   GNP Population
(Intercept) 190.0269691  0.1445617813 -2.0954381
GNP   0.1445618  0.0001133631 -0.0016054
Population   -2.0954381 -0.0016053999  0.0231456



Moreoever, lm() has a singular.ok() argument that defaults to TRUE, but glm() 
doesn't have this argument:



> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), 
+  data=longley, singular.ok=FALSE)
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
  singular fit encountered



In my opinion, singularity should at least produce a warning, both in calls to 
lm() and glm(), and in summary() output. Even better, again in my opinion, 
would be to produce an error by default in this situation, but doing so would 
likely break too much existing code. 

I prefer NA to 0 for the redundant coefficients because it at least suggests 
that the decision about what to exclude is arbitrary, and of course simply 
excluding coefficients isn't the only way to proceed. 

Finally, the differences in behaviour between coef() and vcov() and between 
lm() and glm() aren't really sensible.

Maybe there's some reason for all this that escapes me.

Best,
 John

--
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socserv.mcmaster.ca/jfox




> -Original Message-
> From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of
> Therneau, Terry M., Ph.D.
> Sent: Wednesday, September 13, 2017 6:19 PM
> To: r-devel@r-project.org
> Subject: [Rd] vcov and survival
> 
> I have just noticed a difference in behavior between coxph and lm/glm:
> if one or more of the coefficients from the fit in NA, then lm and glm
> omit that row/column from the variance matrix; while coxph retains it
> but sets the values to zero.
> 
>Is this something that should be "fixed", i.e., made to agree? I
> suspect that doing so will break other packages, but then NA coefs are
> rather rare so perhaps not.
> 
> Terry Therneau
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/l

[Rd] vcov and survival

2017-09-13 Thread Therneau, Terry M., Ph.D.
I have just noticed a difference in behavior between coxph and lm/glm: if one or more of 
the coefficients from the fit in NA, then lm and glm omit that row/column from the 
variance matrix; while coxph retains it but sets the values to zero.


  Is this something that should be "fixed", i.e., made to agree? I suspect that doing so 
will break other packages, but then NA coefs are rather rare so perhaps not.


Terry Therneau

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] y label for X11 graphics

2017-09-13 Thread Therneau, Terry M., Ph.D.

In the following plot, the y label is missing if it is too long.

x11(type="Xlib")
plot(1:5, 1:5, ylab="Do, a deer, a female deer")   # missing label
plot(1:5, 1:5, ylab="Do")  # label is present

All is well for x11(type="cairo")

This is true both under R devel 2017-09-01 on xubuntu (my desktop), and 3.4.1 on Centos 
6.9 (department servers).



A minor question is why my locally compiled version defaults to Xlib rather than cairo, 
since both work as explicit arguments to the x11() command.


Terry T.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] establishing a Code of Conduct for R

2017-09-13 Thread Brian G. Peterson

On Wed, 2017-09-13 at 12:54 +0200, Suzen, Mehmet wrote:
> Dear Colleagues/Developers/R enthusiasts,
> 
> Would it be possible to develop a code of conduct (CoC) document for
> R lists, CRAN submissions that all developers/maintainers to follow?
> This may help all of us to better communicate and move forward
> together.
> There is a similar effort from Python community, here are the links:
> 
> * https://mail.python.org/pipermail/scipy-dev/2017-August/022044.html
> * https://opensource.guide/code-of-conduct/
> 

I am not an official representative of the R team, so this is only my
opinion.

It seems to me that you are trying to create a solution to a problem
which does not exist.

All the R mailing lists have posting guides.  The mailing list
community is largely self-policing to unwelcome behavior and corrects
it quickly.

In over 15 years as an active part of this community, it has always
appeared to me that the community as a whole already conducts itself in
a spirit of professionalism and cooperation.

So I don't see the point in asking already overworked volunteers to
take on and police more formal policies that really seem unnecessary.

Regards,

Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] establishing a Code of Conduct for R

2017-09-13 Thread Suzen, Mehmet
Dear Colleagues/Developers/R enthusiasts,

Would it be possible to develop a code of conduct (CoC) document for
R lists, CRAN submissions that all developers/maintainers to follow?
This may help all of us to better communicate and move forward together.
There is a similar effort from Python community, here are the links:

* https://mail.python.org/pipermail/scipy-dev/2017-August/022044.html
* https://opensource.guide/code-of-conduct/

Kind regards,
Mehmet

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] unpackPkgZip: "unable to move temporary installation" due to antivirus

2017-09-13 Thread Mike Toews
Hi,

Me and an office colleague on Microsoft Windows 10 PCs are having
difficulty installing any package. This is a recent issue for us, and
we suspect our McAfee antivirus has modified by our IT department.
Let's take, for example, install.packages("mypackage"), here is the
output:

package ‘mypackage’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation
‘C:\Users\mtoews\Documents\R\win-library\3.3\file382064842da2\mypackage’
to ‘C:\Users\mtoews\Documents\R\win-library\3.3\mypackage’

Debugging, I found the issue around here:
https://github.com/wch/r-source/blob/980c15af89d99c04e09a40708512a57c49d1c6ee/src/library/utils/R/windows/install.packages.R#L173-L174
> ## To avoid anti-virus interference, wait a little
> Sys.sleep(0.5)

As indicated by an answer
(https://stackoverflow.com/a/44256437/327026), debugging slows down
the function to allow the package to be installed. A simple fix is to
increase the sleep time to a time that is longer than 0.5 seconds.
(I've tried testing new times, but I can't seem to overload this
function). Or use a different strategy, such as using a few attempts
with increasing wait times, or using a custom unlink function.

Happy to help out or test more on this issue. Also, if any R Core
member could add me to R's Bugzilla members, that would be convenient
for me.

Cheers,
Mike

R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] CRAN incoming checks / winbuilder on demand results for R-devel

2017-09-13 Thread Uwe Ligges

Dear package developers,

given some very recent changes in R-devel, many packages under R-devel 
have to be reinstalled. Due to maintainance work on CRAN we probably 
won't process submissions today. R-devel results from winbuilder will be 
flaky at least during the next 10 hours.


Best,
Uwe Ligges

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel