Learn R Programming

BigDataStatMeth (version 1.0.3)

bdCreate_hdf5_group: Create Group in an HDF5 File

Description

Create a (nested) group inside an HDF5 file. The operation is idempotent: if the group already exists, no error is raised.

Usage

bdCreate_hdf5_group(filename, group)

Value

List with components:

fn

Character string with the HDF5 filename

gr

Character string with the full group path created within the HDF5 file

Arguments

filename

Character string. Path to the HDF5 file.

group

Character string. Group path to create (e.g., "MGCCA_OUT/scores").

Details

Intermediate groups are created when needed. The HDF5 file must exist prior to the call (create it with a writer function).

References

The HDF Group. HDF5 User's Guide.

See Also

bdCreate_hdf5_matrix, bdRemove_hdf5_element

Examples

Run this code
if (FALSE) {
library(BigDataStatMeth)
fn <- "test.hdf5"

# Ensure file exists (e.g., by creating an empty dataset or via a helper)
mat <- matrix(0, nrow = 1, ncol = 1)
bdCreate_hdf5_matrix(fn, mat, group = "tmp", dataset = "seed",
                     overwriteFile = TRUE)

# Create nested group
bdCreate_hdf5_group(fn, "MGCCA_OUT/scores")
}

Run the code above in your browser using DataLab