| split_dataset | R Documentation |
Splits an HDF5Matrixinto equal-sized sub-matrices
stored as separate datasets in the same HDF5 file.
Output datasets are named <out_group>/<out_dataset>.0,
<out_group>/<out_dataset>.1, ... (0-based index).
Exactly one of n_blocks or block_size must be provided.
split_dataset(x, n_blocks = NULL, block_size = NULL, bycols = FALSE, ...)
## S3 method for class 'HDF5Matrix'
split_dataset(
x,
n_blocks = NULL,
block_size = NULL,
bycols = FALSE,
out_group = "SPLIT",
out_dataset = NULL,
overwrite = FALSE,
...
)
x |
An |
n_blocks |
Integer or |
block_size |
Integer or |
bycols |
Logical. Split by columns ( |
... |
Ignored. |
out_group |
Character. Output HDF5 group (default |
out_dataset |
Character or NULL. Base dataset name. |
overwrite |
Logical. Overwrite existing blocks (default |
A named list of HDF5Matrix objects.
cbind.HDF5Matrix
tmp <- tempfile(fileext = ".h5")
M <- hdf5_create_matrix(tmp, "data/M", data = matrix(1:60, 6, 10))
blks <- split_dataset(M, n_blocks = 3L)
length(blks)
lapply(blks, close)
close(M)
unlink(tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.