search for: ddimatrix

Displaying 9 results from an estimated 9 matches for "ddimatrix".

2006 Dec 19
1
preserving sparse matrices (Matrix)
...e sparse (tridiagonal) matrices, and I use the Matrix package for handling them. For certain computations, I need to either set the first row to zero, or double the last row. I find that neither operation preserves sparsity, eg > m <- Diagonal(5) > m 5 x 5 diagonal matrix of class "ddiMatrix" [,1] [,2] [,3] [,4] [,5] [1,] 1 . . . . [2,] . 1 . . . [3,] . . 1 . . [4,] . . . 1 . [5,] . . . . 1 > m[1,] <- 0 > m 5 x 5 Matrix of class "dgeMatrix" [,1] [,2] [,3] [,4] [,5] [1,] 0...
2018 Apr 23
4
R 3.5.0 fails its regression test suite on Linux/x86_64
..., 2, sparse=FALSE)# -> 'dense' | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,] 0 0 | > [2,] 0 0 | > [3,] 0 0 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE)# diagonal ! | > 2 x 2 diagonal matrix of class "ddiMatrix" | > [,1] [,2] | > [1,] 0 . | > [2,] . 0 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE, doDiag=FALSE)# -> dense | > 2 x 2 Matrix of class "dsyMatrix" | > [,1] [,2] | > [1,] 0 0 | > [2,] 0 0 | > | > Mat...
2018 Apr 23
0
R 3.5.0 fails its regression test suite on Linux/x86_64
...| > 3 x 2 Matrix of class "dgeMatrix" > | > [,1] [,2] > | > [1,] 0 0 > | > [2,] 0 0 > | > [3,] 0 0 > | > > | > Matrix> Matrix(0, 2, 2, sparse=FALSE)# diagonal ! > | > 2 x 2 diagonal matrix of class "ddiMatrix" > | > [,1] [,2] > | > [1,] 0 . > | > [2,] . 0 > | > > | > Matrix> Matrix(0, 2, 2, sparse=FALSE, doDiag=FALSE)# -> dense > | > 2 x 2 Matrix of class "dsyMatrix" > | > [,1] [,2] > | > [1,] 0...
2012 Aug 14
2
Communative Matrix Multiplcation
....79520232536024, 1.94348587548554, 2.6116969228074, 5.44481720170706, 4.55518279829294, 2.35038512365318, 2.20479767463976, 3.05651412451446, 2.3883030771926, 4.55518279829294, 5.44481720170706 ) , Dim = c(6L, 6L) , Dimnames = list(NULL, NULL) , factors = list() ) > dput(D) new("ddiMatrix" , diag = "N" , Dim = c(6L, 6L) , Dimnames = list(NULL, NULL) , x = c(5, 5, 5, 5, 10, 10) ) [[alternative HTML version deleted]]
2007 Jun 19
1
Matrix library error: "should never happen; please report"
...a simple chunk of code: .TM.repl.i.2col(): drop 'matrix' case ... Error in .nextMethod(x = x, i = i, j = j) : 'i' has no integer column number should never happen; please report In addition: Warning messages: 1: Ambiguous method selection for "%*%", target "ddiMatrix#dgCMatrix" (the first of the signatures shown will be used) diagonalMatrix#CsparseMatrix ddenseMatrix#CsparseMatrix in: .findInheritedMethods(classes, fdef, mtable) I got 4 other copies of the same warning. Will play around a bit more... This is really strange. Thanks -- Jose...
2006 Oct 19
0
incorrect result for Matrix() %*% Diagonal()
I'm exploring pedigree() in lme4 and found some strange results trying to multiply a dtCMatrix by a diag() matrix using %*%. Studying the Matrix documentation, I stumbled upon the following error in the example on the ddiMatrix-class {Matrix} help page. I wonder if my problem could be related to this. > matrix(cbind(1, 2:4),3,2) %*% diag(c(10,1)) # OK [,1] [,2] [1,] 10 2 [2,] 10 3 [3,] 10 4 > Matrix(cbind(1, 2:4)) %*% Diagonal(x=c(10,1)) # KO 3 x 2 Matrix of class "dgeMatrix" [,1...
2009 Aug 28
2
R CMD check does not recognize S4 functions inside other functions?
I am developing a new R package and am now checking it for submission to CRAN. The some functions in the package make use of the sparse matrix routines in the package 'Matrix'. When these are loaded in R, they create no problems. However, when running R CMD check, I run into the following error in executing the examples in a .rd file: > DD = Matrix(diag(1,200),sparse=TRUE) >
2015 Mar 19
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
...class ?dgCMatrix? If a predictor matrix was created using sparseMatrix as follows, one gets unexpected results, as this simple example shows. My fix was easy (I always convert the predictor matrix to class ?dgCMatrix? now) Trevor > y=Matrix(diag(4)) > y 4 x 4 diagonal matrix of class "ddiMatrix" [,1] [,2] [,3] [,4] [1,] 1 . . . [2,] . 1 . . [3,] . . 1 . [4,] . . . 1 > z=sparseMatrix(1:4,1:4) > z 4 x 4 sparse Matrix of class "ngCMatrix" [1,] | . . . [2,] . | . . [3,] . . | . [4,] . . . | > beta=as(Mat...
2015 Mar 19
6
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
This is a Request For Comment, also BCCed to 390 package maintainers of reverse dependencies of the Matrix package. Most users and package authors working with our 'Matrix' package will be using it for numerical computations, and so will be using "dMatrix" (d : double precision) matrix objects M, and indirectly, e.g., for M >= c will also use "lMatrix" (l: