powered by
"ldiMatrix"
new("ldiMatrix", ...)
Diagonal
"diagonalMatrix"
"lMatrix"
Class "sparseMatrix", by class "diagonalMatrix".
"sparseMatrix"
ddiMatrix
diagonalMatrix
(lM <- Diagonal(x = c(TRUE,FALSE,FALSE))) str(lM)#> gory details (slots) crossprod(lM) # numeric (nM <- as(lM, "nMatrix"))# -> sparse (not formally ``diagonal'') crossprod(nM) # logical sparse
Run the code above in your browser using DataLab