Sorry for the poor wording, I'm hoping to change the name of an internal variable in a dgCMatrix. Specifically I want to change "Dimnames" to "dimnames" (I've attached a picture of the object variables for clarity), as I believe that may help with an error I'm getting (I'll post that at the bottom).
I've tried this, but to no avail
rename(emat@Dimnames, "dimnames")
The error I hope to fix with this:
> rvel.cd <- gene.relative.velocity.estimates(emat,nmat,deltaT=2,
+ kCells=10,
+ cell.dist=cell.dist,
+ fit.quantile=fit.quantile,
+ n.cores=2)
matching cells between cell.dist and emat/nmat ... done
calculating cell knn ... done
calculating convolved matrices ... Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE) :
no 'dimnames[[.]]': cannot use character indexing
Reproducible data:
#Generate dgCMatrix
library(Matrix)
i <- c(1,3:8)
j <- c(2,9,6:10)
x <- 7 * (1:7)
emat <- sparseMatrix(i, j, x = x)