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.