I can not find any function or package to calculate the null space or (QR decomposition) of a bigmatrix
(from library(bigmemory)
) in R. For example:
library(bigmemory)
a <- big.matrix(1000000, 1000, type='double', init=0)
I tried the following but got the errors shown. How can I find the null space of a bigmemory
object?
a.qr <- Matrix::qr(a)
# Error in as.vector(data) :
# no method for coercing this S4 class to a vector
q.null <- MASS::Null(a)
# Error in as.vector(data) :
# no method for coercing this S4 class to a vector
If you want to compute the full SVD of the matrix, you can use package bigstatsr to perform computations by block. A
FBM
stands for a Filebacked Big Matrix and is an object similar to a filebackedbig.matrix
object of package bigmemory.This takes approximately 10 minutes on my computer.
@Mahon @user20650 @F.Privė For clarity I pinged the bigmemory team and asked
I felt it useful to get clarity on the original question asked. @F.Privė - nice answer. Hopefully your answer, and their response will help guide people in the future. Their response below: