SparseM.image {SparseM} | R Documentation |
Display the pattern of non-zero entries of
a matrix of class matrix.csr
or matrix.csc
image(x, ...)
x |
a matrix of class matrix.csr or matrix.csc . |
... |
additional arguments. |
The pattern of the non-zero entries of a sparse matrix is displayed. By default nonzero entries of the matrix appear as gray blocks and zero entries as white background.
Koenker, R and Ng, P. (2002). SparseM: A Sparse Matrix Package for R,
http://www.econ.uiuc.edu/~roger/research
SparseM.ops
,
SparseM.solve
,
SparseM.ontology
a <- rnorm(20*5) A <- matrix(a,20,5) A[row(A)>col(A)+4|row(A)<col(A)+3] <- 0 b <- rnorm(20*5) B <- matrix(b,20,5) B[row(A)>col(A)+2|row(A)<col(A)+2] <- 0 image(as.matrix.csr(A)%*%as.matrix.csr(t(B)))