Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-11 Thread Martin Maechler
> Martin Maechler > on Tue, 8 Dec 2015 15:25:21 +0100 writes: > John Chambers > on Mon, 7 Dec 2015 16:05:59 -0800 writes: >> We do need an explicit method here, I think. >> The issue is that as() uses methods for the generic function coerce() but cannot use inhe

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-11 Thread John Chambers
Somehow, the most obvious fixes are always back-incompatible these days. The example intrigued me, so I looked into it a bit (should have been doing something else, but ) You're right that this is the proverbial thin-edge-of-the-wedge. The problem is in setDataPart(), which will be called w

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-11 Thread Morgan, Martin
>From the Bioconductor side of things, the general feeling is that this is a >step in the right direction and worth the broken packages. Martin Morgan From: R-devel [r-devel-boun...@r-project.org] on behalf of Martin Maechler [maech...@stat.math.ethz.ch] S

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-12 Thread Martin Maechler
> John Chambers > on Fri, 11 Dec 2015 10:11:05 -0800 writes: > Somehow, the most obvious fixes are always back-incompatible these days. > The example intrigued me, so I looked into it a bit (should have been doing something else, but ) > You're right that this is the

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-19 Thread Martin Maechler
> Martin Maechler > on Sat, 12 Dec 2015 10:32:51 +0100 writes: > John Chambers > on Fri, 11 Dec 2015 10:11:05 -0800 writes: >> Somehow, the most obvious fixes are always back-incompatible these days. >> The example intrigued me, so I looked into it a bit (should

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-19 Thread John Chambers
As I tried to say on Dec. 11, there are two levels of "fix": 1. The fix to the complaint in the OP's subject heading is to conform to the default third argument, strict=TRUE: as(1L, "numeric") == 1.0 This generates some incompatibilities, as for classes that extend "numeric". But still leaves

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-25 Thread Hervé Pagès
Or maybe the "right" concept is that "numeric" is a virtual class with 3 subclasses: "complex", "double", and "integer". Anyway it's probably too late for implementing the "right" concept so it doesn't really matter. Thanks Martin for offering to fix the as(1L, "numeric") bug. Very much appreciat

Re: [Bioc-devel] [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-26 Thread John Chambers
Re: coerce() methods. Important to realize that as() does not call selectMethod() in the standard way, but restricts inheritance to the first argument: asMethod <- selectMethod("coerce", sig, optional = TRUE, c(from = TRUE, to = FALSE), fdef = coerceFun, A valid