Learn R Programming

SeuratObject (version 5.0.2)

as.sparse: Cast to Sparse

Description

Convert dense objects to sparse representations

Usage

as.sparse(x, ...)

# S3 method for data.frame as.sparse(x, row.names = NULL, ...)

# S3 method for Matrix as.sparse(x, ...)

# S3 method for matrix as.sparse(x, ...)

# S3 method for ngCMatrix as.sparse(x, ...)

Value

A sparse representation of the input data

Arguments

x

An object

...

Arguments passed to other methods

row.names

NULL or a character vector giving the row names for the data; missing values are not allowed