to_sparse: Convert to sparse

View source: R/to_sparse.R

to_sparseR Documentation

Convert to sparse

Description

Convert a matrix / data.frame to a sparse matrix. If X is already a sparse matrix, it simply returns X directly.

Usage

to_sparse(X, verbose = TRUE)

Arguments

X

A matrix / data.frame.

verbose

Print messages.

Value

Sparse matrix.

Examples

mat <- to_sparse(X = mtcars)

RajLabMSSM/echoLD documentation built on May 12, 2024, 3:23 a.m.