Can't `cbind` DelayedArray instances with other matrix-likes

Open
#100 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r
Domain
data

Research direction

Start by reproducing the mixed cbind(y, x) and cbind(y, y) examples from the issue, then inspect the bindCOLS method dispatch for DelayedMatrix. Done means cbind accepts a DelayedArray together with a regular matrix without the reported method error, while preserving the existing DelayedArray result behavior.

Written by the indexing model from the issue text.

Description

I could have sworn this used to work.

library(DelayedArray)
x <- matrix(runif(100), 10, 10)
y <- DelayedArray(x)
cbind(y, x)
## Error in (function (classes, fdef, mtable)  : 
##   unable to find an inherited method for function ‘bindCOLS’ for signature ‘"DelayedMatrix"’

Two DelayedArrays are fine:

cbind(y, y)
## <10 x 20> matrix of class DelayedMatrix and type "double":
## etc.
Session information
> sessionInfo()
R version 4.2.0 Patched (2022-05-06 r82323)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /home/luna/Software/R/R-4-2-branch/lib/libRblas.so
LAPACK: /home/luna/Software/R/R-4-2-branch/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] DelayedArray_0.22.0  IRanges_2.30.0       S4Vectors_0.34.0    
[4] MatrixGenerics_1.8.0 matrixStats_0.62.0   BiocGenerics_0.42.0 
[7] Matrix_1.4-1        

loaded via a namespace (and not attached):
[1] compiler_4.2.0  grid_4.2.0      lattice_0.20-45
Dominant language
R
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Bioconductor/DelayedArray

All issues in Bioconductor/DelayedArray

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.