rcpp_hdf5_create_matrix

rcpp_hdf5_create_matrix

OTHER

1 Description

Creates an HDF5 dataset of size nrows x ncols and optionally writes data to it. Replaces bdCreate_hdf5_matrix() / bdCreate_hdf5_emptyDataset() in the R6+S3 interface so that compression can be controlled from R.

2 Usage

rcpp_hdf5_create_matrix(filename, group, dataset, nrows, ncols, data = NULL, dtype = "real", overwrite_file = FALSE, overwrite_dataset = FALSE, compression = 6L)

3 Arguments

Parameter Description
filename Character. Path to the HDF5 file.
group Character. Group path inside the file.
dataset Character. Dataset name.
nrows Integer. Number of rows (>= 1).
ncols Integer. Number of columns (>= 1).
data Optional numeric/integer matrix or data.frame; NULL creates an empty (zero-filled) dataset.
dtype Character. Element type: “real” (default), “int”, “logical”.
overwrite_file Logical. Recreate file if it already exists.
overwrite_dataset Logical. Replace dataset if it already exists.
compression Integer 0-9. gzip compression level (0 = no compression, 6 = balanced default). Applied to the new dataset only.

4 Value

Named list with and of the created dataset.