Learn R Programming

spam (version 0.13-3)

spam-class: Class "spam"

Description

The spam class is a representation of sparse matrices.

Arguments

Objects from the Class

Objects can be created by calls of the form new("spam", entries, colindices, rowpointes, dimension). The standard "old Yale sparse format" is used to store sparse matrices. The matrix x is stored in row form. The first element of row i is x@rowpointers[i]. The length of row i is determined by x@rowpointers[i+1]-x@rowpointers[i]. The column indices of x are stored in the x@colindices vector. The column index for element x@entries[k] is x@colindices[k].

Examples

Run this code
smat <- diag.spam(runif(15))
range(smat)
cos(smat)

Run the code above in your browser using DataLab