Displaying 2 results from an estimated 2 matches for "mmqr".
Did you mean:
mmer
2011 Aug 23
0
Matrix:::qr.qy and signature(qr = "sparseQR", y = "dgCMatrix")
...ion available for the following signature: signature(qr = "sparseQR", y = "dgCMatrix") - although it indicates that it understands this signature.
Following is a minimal example (in my application dd2 is too large for my memory):
library(Matrix)
data(KNex);
mm <- KNex$mm
mmQR <- qr(mm)
dim(mmQR) # 1850 712
class(mmQR) # [1] "sparseQR";attr(,"package");"Matrix"
dd1 <- sparseMatrix(1:ncol(mm),1:ncol(mm), x = 1, dims = c(nrow(mm),ncol(mm)))
class(dd1) # dgCMatrix;attr(,"package");Matrix
dd2 <- diag(1,ncol = ncol(mm) ,...
2011 Mar 31
1
rank of Matrix
Dear list,
Can anyone tell me how to obtain the rank of a sparse Matrix, for
example from package Matrix (class dgCMatrix)? Here is an example of
QR decomposition of a sparse matrix (from the sparseQR class help).
library(Matrix)
data(KNex)
mm <- KNex$mm
str(mmQR <- qr(mm))
Similarly, using the functions/classes from the relatively new
MatrixModels package:
library(MatrixModels)
str(trial <- data.frame(counts=c(18,17,15,20,10,20,25,13,12),
outcome=gl(3,1,9,labels=LETTERS[1:3]),
treatment=gl(3,3,labels=...