sparsify {sanic}R Documentation

Transform a Matrix to Be Sparse.

Description

Concise function to transform dense to sparse matrices of class dgCMatrix (see sparseMatrix).

Usage

sparsify(x)

Arguments

x

Numeric matrix to transform to a sparse 'dgCMatrix'.

Value

Returns 'x' as dgCMatrix.

Examples

sparsify(matrix(rnorm(9L), 3L))

[Package sanic version 0.0.2 Index]