Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-11-01 Thread Henrik Bengtsson
> I assume it did, or you would not have noticed ? I noticed it because I got a notice from CRAN about 'matrixStats' starting to fail on R-devel. It was a non-critical failure, because it was due to how the package tests compare the results to the corresponding base-R implementation. Basically,

Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-31 Thread Martin Maechler
> Hervé Pagès > on Mon, 30 Oct 2023 17:17:47 -0700 writes: > Hi Martin, Henrik, I actually like this change. > Makes a lot of sense IMO that dim(x) <- dim(x) be a no-op, > or, more generally, that foo(x) <- foo(x) be a no-op for > any setter/getter combo. yes. For

Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-30 Thread Hervé Pagès
Hi Martin, Henrik, I actually like this change. Makes a lot of sense IMO that dim(x) <- dim(x) be a no-op, or, more generally, that foo(x) <- foo(x) be a no-op for any setter/getter combo. FWIW S4Arrays::set_dim() does that too. It also preserves the dimnames if the right value is only adding

Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-30 Thread Martin Maechler
> Henrik Bengtsson > on Sun, 29 Oct 2023 10:42:19 -0700 writes: > Hello, > the fix of PR18612 > (https://bugs.r-project.org/show_bug.cgi?id=18612) in > r85380 > (https://github.com/wch/r-source/commit/2653cc6203fce4c48874111c75bbccac3ac4e803) > caused a

[Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-29 Thread Henrik Bengtsson
Hello, the fix of PR18612 (https://bugs.r-project.org/show_bug.cgi?id=18612) in r85380 (https://github.com/wch/r-source/commit/2653cc6203fce4c48874111c75bbccac3ac4e803) caused a change in `dim<-()`. Specifically, in the past, any `dim<-()` assignment would _always_ remove "dimnames" and "names"