as_matrix: Attempts to turn a dgCMatrix into a dense matrix

View source: R/utils.R

as_matrixR Documentation

Attempts to turn a dgCMatrix into a dense matrix

Description

Attempts to turn a dgCMatrix into a dense matrix

Usage

as_matrix(x)

Arguments

x

A matrix.

Examples

data("pancreas_sub")
system.time(mat1 <- as.matrix(slot(pancreas_sub[["RNA"]], "counts")))
system.time(mat2 <- as_matrix(slot(pancreas_sub[["RNA"]], "counts")))
identical(mat1, mat2)


zh542370159/SCP documentation built on Nov. 22, 2023, 2:34 a.m.