Re: [Rd] parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)

2018-03-08 Thread Henrik Bengtsson
A solution is to have parallel:::.slaveRSOCK() attempt to connect multiple times before failing, e.g. makeSOCKmaster <- function(master, port, timeout, useXDR, maxTries = 10L, interval = 1.0) { port <- as.integer(port) for (i in seq_len(maxTries)) { con <- tryCatch({

Re: [Rd] parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)

2018-03-08 Thread Henrik Bengtsson
I just noticed that parallel:::.slaveRSOCK() passes 'timeout' to socketConnection() as a character, i.e. there's a missing timeout <- as.integer(timeout), cf. port <- as.integer(port) and useXDR <- as.logical(value): > parallel:::.slaveRSOCK function () { makeSOCKmaster <- function(master, por

[Rd] parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)

2018-03-08 Thread Henrik Bengtsson
BACKGROUND: While troubleshooting random, occasionally occurring, errors from parallel::makePSOCKcluster("localhost", port = 11000); Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, : cannot open the connection I had another look at parallel:::newPSOCKnode(

[Rd] reshape function: allow split argument to include perl

2018-03-08 Thread Edward McNeil
Hi, I'd like to request that the "split" argument of the reshape function include the perl argument so that "splitting" is more flexible. An example is if the varying argument contains "Q1.1.1, Q1.1.2, Q1.2.1, Q1.2.2, " etc. Splitting on the last "dot" seems to be only possible using perl. > x

[Rd] [Bug report] Chinese characters are not handled correctly in Rterm for Windows

2018-03-08 Thread Azure
Hello everyone, I am new to R and I have experienced some bugs when using Rterm on Windows. Chinese characters in the console output are discarded by Rterm, and trying to type them into the console will crash the Rterm application. ---ENVIRONMENT--- Platform = x86_64-w64-mingw32 OS = Window

Re: [Rd] [EXTERNAL] Re: Fwd: Re: Re: backquotes and term.labels

2018-03-08 Thread Ben Bolker
That's more or less right. We wrote a terms.merMod method, which accesses the terms component of the @frame slot, which we have modified upstream ... Do you mean term.labels rather than term.names? BTW ?terms.object says (under the "term.labels" element): Non-syntactic names will be quote

Re: [Rd] Bug report - duplicate row names with as.data.frame()

2018-03-08 Thread Martin Maechler
> Martyn Plummer > on Thu, 1 Mar 2018 17:23:04 + writes: > On Thu, 2018-03-01 at 09:36 -0500, Ron wrote: >> Hello, >> >> I'd like to report what I think is a bug: using as.data.frame() we can >> create duplicate row names in a data frame. R version 3.4.3 (curr

[Rd] CRAN incoming services and winbuilder down Mar 9-10

2018-03-08 Thread Uwe Ligges
Dear list, due to a full power shutdown in the relevant building at TU Dortmund University we have to shut down winbuilder and the CRAN incoming check service from Mar 9, 5pm CET to Mar 10, 5pm CET Best, Uwe Ligges (CRAN team) __ R-devel@r-project.

Re: [Rd] [EXTERNAL] Re: Fwd: Re: Re: backquotes and term.labels

2018-03-08 Thread Therneau, Terry M., Ph.D. via R-devel
Ben, I looked at the source code you pointed out, and the line fr <- fr[attr(terms(fr),"varnames.fixed")] sure looks to me as though the terms() function has returned an object with a varnames.fixed attribute. Either that or your code has inside knowledge that a reader like me won't know.

Re: [Rd] Fwd: Re: [EXTERNAL] Re: backquotes and term.labels

2018-03-08 Thread Ben Bolker
On 18-03-08 10:07 AM, Martin Maechler wrote: >> Ben Bolker >> on Thu, 8 Mar 2018 09:42:40 -0500 writes: > > > Meant to respond to this but forgot. > > I didn't write a new terms() function -- I added an attribute to the > > terms() (a vector of the names > > of the

Re: [Rd] Fwd: Re: [EXTERNAL] Re: backquotes and term.labels

2018-03-08 Thread Martin Maechler
> Ben Bolker > on Thu, 8 Mar 2018 09:42:40 -0500 writes: > Meant to respond to this but forgot. > I didn't write a new terms() function -- I added an attribute to the > terms() (a vector of the names > of the constructed model matrix), thus preserving the information

Re: [Rd] Fwd: Re: [EXTERNAL] Re: backquotes and term.labels

2018-03-08 Thread Ben Bolker
Meant to respond to this but forgot. I didn't write a new terms() function -- I added an attribute to the terms() (a vector of the names of the constructed model matrix), thus preserving the information at the point when it was available. I do agree that it would be preferable to have an upstr

[Rd] Fwd: Re: [EXTERNAL] Re: backquotes and term.labels

2018-03-08 Thread Therneau, Terry M., Ph.D. via R-devel
Ben, Looking at your notes, it appears that your solution is to write your own terms() function for lme.  It is easy to verify that the "varnames.fixed" attribute is not returned by the ususal terms function. Then I also need to write my own terms function for the survival and coxme pacakges?