search for: knex

Displaying 3 results from an estimated 3 matches for "knex".

Did you mean: knew
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]),...
2006 Nov 29
1
Matrix*vector: coercing sparse to dense matrix for arithmetic
Hi, I have a sparse Matrix (kronecker product of spline design matrices), and I need to multiply each row by a number to get another matrix. If the matrix is A and the numbers are stored in a vector k, with plain vanilla matrices I would do A*k But when using the Matrix package (class of A is "dgCMatrix"), I get the warning "coercing sparse to dense matrix for arithmetic".
2011 Aug 23
0
Matrix:::qr.qy and signature(qr = "sparseQR", y = "dgCMatrix")
...not seem to have a function 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 <-...