View source: R/S3_conversion.R
| as.data.frame.HDF5Matrix | R Documentation |
Reads entire HDF5 dataset into memory as a data.frame. WARNING: This loads all data into RAM.
## S3 method for class 'HDF5Matrix'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
force = FALSE,
max_size_mb = NULL,
...
)
x |
An |
row.names |
Logical or character vector. Row names to use. |
optional |
Logical. Passed to |
force |
Logical. If |
max_size_mb |
Numeric. Maximum size in MB to convert without warning. |
... |
Additional arguments passed to |
First converts to matrix using as.matrix.HDF5Matrix (with same
size checks), then to data.frame. All memory warnings apply.
data.frame with data from HDF5 file
as.matrix.HDF5Matrix
fn <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(fn, "data/X", data = matrix(rnorm(500), 100, 5))
df <- as.data.frame(X)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.