View source: R/realizeFileBackedMatrix.R
realizeFileBackedMatrix | R Documentation |
Realize a file-backed DelayedMatrix into its corresponding in-memory format.
realizeFileBackedMatrix(x)
isFileBackedMatrix(x)
x |
A DelayedMatrix object. |
A file-backed matrix representation is recognized based on whether it has a path
method for any one of its seeds.
If so, and the "beachmat.realizeFileBackedMatrix"
option is not FALSE
, we will load it into memory.
This is intended for DelayedMatrix objects that have already been subsetted (e.g., to highly variable genes),
which can be feasibly loaded into memory for rapid calculations.
For realizeFileBackedMatrix
, an ordinary matrix or a dgCMatrix, depending on whether is_sparse(x)
.
For isFileBackedMatrix
, a logical scalar indicating whether x
has file-backed components.
Aaron Lun
mat <- matrix(rnorm(50), ncol=5)
realizeFileBackedMatrix(mat) # no effect
library(HDF5Array)
mat2 <- as(mat, "HDF5Array")
realizeFileBackedMatrix(mat2) # realized into memory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.