powered by
"ldiMatrix"
new("ldiMatrix", ...)
Diagonal
"diagonalMatrix"
"lMatrix"
"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