rcpp_hdf5_create_matrix: Create an HDF5 dataset with configurable compression (R6...

View source: R/RcppExports.R

rcpp_hdf5_create_matrixR Documentation

Create an HDF5 dataset with configurable compression (R6 wrapper)

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.

Usage

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

Arguments

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.

Value

Named list with filename and path of the created dataset.


BigDataStatMeth documentation built on May 15, 2026, 1:07 a.m.