R Documentation |
Printing (non-zero elements) of sparse matrices and summarizing the sparsity structure thereof.
## S4 method for signature 'spam'
print(x, ...)
## S4 method for signature 'spam'
summary(object, ...)
x |
matrix of class |
object |
matrix of class |
... |
any other arguments passed to |
getOption('spam.printsize')
determines if the sparse matrix is
coerced into a matrix and the printed as an array or if
only the non-zero elements of the matrix are given.
NULL
for print
, because the information is printed with cat
there
is no real need to pass any object back.
A list containing the non-zero elements and the density for
summary
for class spam
.
A list containing the non-zero elements of the factor, the density and
the fill-in for summary
for class spam.chol.NgPeyton
.
Reinhard Furrer
display
or image
for a graphical visualization;
spam.options
set.seed(13)
smat <- spam_random(8)
par(mfcol=c(1,2),pty='s')
options(spam.printsize=1000)
print(smat)
options(spam.printsize=10)
print(smat)
summary(smat)
summary(smat)$nnz
smat@entries[1:5] <- 0
print(smat, minimal = FALSE)
print(smat, minimal = FALSE, rowpointer = TRUE)
smat@rowpointers
print_nnzpos(smat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.