I have a pretty large sparse matrix in R:
> dim(matrix)
[1] 60675 36807
Now, I wanted to calculate the row variance for this matrix using like this:
apply(matrix,1,var)
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102
I suppose my matrix is too large for this to work. My solution was to use multiple cores for this issue like this:
mclapply(Matrix::t(matrix), var, mc.cores=16)
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102
But as you can see, I get the same error again. Do you have any suggestions on how to handle this problem? Maybe subset the matrix and then calculate the variance?