Closed PeteHaitch closed 1 year ago
This was a concious decision I made a long time ago, that all row/col summarization methods defined in DelayedArray would follow the lead of rowSums
/colSums
and rowMeans
/colMeans
in base R by propagating the rownames
/colnames
, independently of what matrixStats was doing. So at the time I chose consistency with base R over consistency with matrixStats.
Note that I made the same choice for SparseMatrix objects (but those are much more recent). With BioC 3.17:
library(SparseArray)
rowMaxs(SparseArray(x))
# R1 R2 R3
# 4 5 6
I'm not too keen to change this just in BioC 3.17. rowMaxs
/colMaxs
and rowMins
/colMins
have propagated the rownames/colnames forever on a DelayedMatrix object, and, starting with BioC 3.18, this behavior is now consistent with matrixStats and MatrixGenerics. So making an exception for BioC 3.17 doesn't sound like a good idea. Plus this would mean changing the behavior of code that was released more than 3 months ago.
Hope that makes sense?
H.
That all makes sense, thanks for the explanation.
I'll just tweak DelayedMatrixStats tests in RELEASE_3_17
to accommodate that.
Hi @hpages,
Similar to #106, these methods for DelayedMatrix objects are defined in DelayedArray rather than DelayedMatrixStats and the default
useNames
behaviour is incorrect inRELEASE_3_17
.Created on 2023-08-08 with reprex v2.0.2