Re: [Rd] [tryExcept] New try Function

2018-11-26 Thread Andrew Redd
I have two related packages that are already submitted to CRAN but are awaiting approval. They are part of the R Documentation Task Force efforts to improve documentation. The exact function you are referring to I have called `catch_condition()` and included it in my `testextra` package. You mig

[Rd] R-devel from 1997 Good Read

2018-11-26 Thread Abs Spurdle
hi all This is possibly a bit off topic. However, the mailing list is quiet at the moment so I thought I would mention it. Recently, I had a look at R-devel (R-alpha?) from 1997. And it's very informative and very cool. I'm planning to go through it more carefully when I get some more free time.

[Rd] issue with testInstalledPackage

2018-11-26 Thread Therneau, Terry M., Ph.D. via R-devel
Background: I run tools::testInstalledPackage on all packages that dependend on survival (605 as of today) before sending a new release to CRAN. It has a few false positives which I then follow up on.  (Mostly packages with as-yet-incomplete tests in their inst directory).  Issue: testInstal

[Rd] Suggestion for `glm.fit`

2018-11-26 Thread Benjamin Christoffersen
Dear sirs, One gets unexpected `residuals` if one is not aware of the meaning of weights when a weight is set to zero and the outcome is one in the `binomial` family in a call to `glm.fit`. The reason is the following line from `binomial()$initialize` > y[weights == 0] <- 0 Here is an example: pv

Re: [Rd] Suggestion for `glm.fit`

2018-11-26 Thread Ben Bolker
I don't know whether this helps or not, but using residuals(fit) rather than fit$residuals returns 0 for the last value. This is different from (predict(fit,type="response")[25] - Y[25]) (or the equivalent Pearson residual) because the *weighted* residuals are returned by definition (not that I

Re: [Rd] issue with testInstalledPackage

2018-11-26 Thread Ben Bolker
FWIW I've been reasonably happy with the revdepcheck package: it's not base-R, but it's pretty robust (lme4 'only' has 286 dependencies to check ...) I've had much better luck running it on a remote server (where the sysadmin is responsive so it's not too much trouble to get extra system depen

Re: [Rd] Subsetting row in single column matrix drops names in resulting vector

2018-11-26 Thread Radford Neal
Dmitriy Selivanov (selivanov.dmit...@gmail.com) wrote: > Consider following example: > > a = matrix(1:2, nrow = 2, dimnames = list(c("row1", "row2"), c("col1"))) > a[1, ] > # 1 > > It returns *unnamed* vector `1` where I would expect named vector. In fact > it returns named vector when number of c