Convert a matrix to sparse metrix.

as.sparse.matrix(X)

Arguments

X

Matrix.

Value

Sparse matrix version of X