% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dbMatrix.R
\name{as.matrix.dbMatrix}
\alias{as.matrix.dbMatrix}
\title{Convert \code{\link{dbMatrix}} to in-memory matrix}
\usage{
\method{as.matrix}{dbMatrix}(x, ..., sparse = FALSE, names = TRUE)
}
\arguments{
\item{x}{A \code{\link{dbMatrix}} object (dbSparseMatrix or dbDenseMatrix)}

\item{...}{Additional arguments (not used)}

\item{sparse}{Logical indicating if the output should be a sparse matrix \code{default:FALSE}}

\item{names}{Logical indicating if the output should have dimnames. \code{default:FALSE}}
}
\value{
A \code{\link[Matrix:dgCMatrix-class]{Matrix::dgCMatrix}} or \code{\link{matrix}}
}
\description{
Converts a \code{\link{dbMatrix}} object into an in-memory matrix or sparse matrix.
}
\details{
This method converts a \code{\link{dbMatrix}} object into an in-memory
\code{\link[Matrix:dgCMatrix-class]{Matrix::dgCMatrix}} (sparse = TRUE) or \code{matrix()} (default, sparse = FALSE).

\strong{Warning: This function can cause memory issues for large \code{\link{dbMatrix}} objects.}

Set \code{sparse = TRUE} to convert to a sparse matrix.
Set \code{names = TRUE} to keep dimnames.
}
\concept{dbMatrix}
