const-ae / const-ae/sparseMatrixStats

colVars for dgeMatrix

Abierto
#24 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
R
Estrellas
55
Forks
3
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am working with large sparse matrices that, after some operations, can return non-sparse matrices of class `dgeMatrix`.

I must be missing something here, but when I try to get colVars for a `dgeMatrix`, I get

```
Error in MatrixGenerics:::.load_next_suggested_package_to_search(x) :
Failed to find a colVars() method for dgeMatrix objects.
```

even though `colMeans2` works just fine.

Here is some (hopefully) reproducible code:

```
m <- Matrix(nrow = 3, ncol = 6, data = rnorm(18), sparse = FALSE)
sparseMatrixStats::colVars(m)
```

PS: `matrixStats::colVars(m)` returns

```
Error in matrixStats::colVars(m) :
Argument 'x' must be a matrix or a vector.
```

and calling `as.matrix` prior to `matrixStats::colVars` is very slow on larger matrices.

Any help would be much appreciated.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza reproduciendo el ejemplo con sparseMatrixStats::colVars() sobre una dgeMatrix y, después, sigue el dispatch de colVars junto con la ruta funcional de colMeans2. El problema estará resuelto cuando colVars funcione para entradas dgeMatrix sin convertir matrices grandes con as.matrix().

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.