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

2016-01-04 Thread Josh O'Brien
On Dec 19, 2015, at 3:32 AM, Martin Maechler wrote: >> 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

Re: [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

Re: [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

Re: [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

Re: [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]

Re: [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

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

2015-12-08 Thread Martin Maechler
> 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 inheritance in the usual way (if it did, you would be

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

2015-12-07 Thread John Chambers
We do need an explicit method here, I think. The issue is that as() uses methods for the generic function coerce() but cannot use inheritance in the usual way (if it did, you would be immediately back with no change, since "integer" inherits from "numeric"). Copying in the general method for

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

2015-12-07 Thread Benjamin Tyner
Perhaps it is not that surprising, given that > mode(1L) [1] "numeric" and > is.numeric(1L) [1] TRUE On the other hand, this is curious, to say the least: > is.double(as(1L, "double")) [1] FALSE Here's the surprising behavior: x <- 1L xx <- as(x, "numeric")