View source: R/S3_standalone.R
| hdf5_reduce | R Documentation |
Applies a binary reduction ("+" or "-") across all
datasets stored in a given HDF5 group and writes the result as a new
dataset. Delegates to bdReduce_hdf5_dataset().
hdf5_reduce(
filename,
group,
func = "+",
outgroup = NULL,
outdataset = NULL,
overwrite = FALSE,
remove = FALSE
)
filename |
Path to the HDF5 file. |
group |
Group path containing the datasets to reduce. |
func |
Character. Reduction operator: |
outgroup |
Character or |
outdataset |
Character or |
overwrite |
Logical. Overwrite existing output dataset. |
remove |
Logical. Remove input datasets after reduction. |
An HDF5Matrix pointing to the result dataset.
hdf5_apply, cbind.HDF5Matrix
fn <- tempfile(fileext = ".h5")
hdf5_create_matrix(fn, "blocks/A", data = matrix(1:6, 2, 3))
hdf5_create_matrix(fn, "blocks/B", data = matrix(1:6, 2, 3))
hdf5_create_matrix(fn, "blocks/C", data = matrix(1:6, 2, 3))
result <- hdf5_reduce(fn, group = "blocks", func = "+")
as.matrix(result)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.