Skip to contents

Converts a dbMatrix object into an in-memory matrix or sparse matrix.

Usage

# S4 method for class 'dbMatrix'
as.matrix(x, ...)

Arguments

x

A dbMatrix object (dbSparseMatrix or dbDenseMatrix)

...

Additional arguments (not used)

Value

A Matrix::dgCMatrix or base R matrix

Details

This method converts a dbMatrix object (dbSparseMatrix or dbDenseMatrix) to an in-memory Matrix::dgCMatrix (for sparse) or base R matrix (for dense). Warning: This can cause memory issues if the input matrix is large.