Create a (nested) group inside an HDF5 file. The operation is idempotent: if the group already exists, no error is raised.
2 Usage
bdCreate_hdf5_group(filename, group)
3 Arguments
Parameter
Description
filename
Character string. Path to the HDF5 file.
group
Character string. Group path to create (e.g., "MGCCA_OUT/scores").
4 Value
List with components:
fn: Character string with the HDF5 filename
gr: Character string with the full group path created within the HDF5 file
5 Details
Intermediate groups are created when needed. The HDF5 file must exist prior to the call (create it with a writer function).
6 Examples
Code
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 groupbdCreate_hdf5_group(fn, "MGCCA_OUT/scores")
---title: "bdCreate_hdf5_group"subtitle: "bdCreate_hdf5_group"---<span class="category-badge hdf5_io_management">HDF5_IO_MANAGEMENT</span>## DescriptionCreate a (nested) group inside an HDF5 file. The operation isidempotent: if the group already exists, no error is raised.## Usage```rbdCreate_hdf5_group(filename, group)```## Arguments::: {.param-table}| Parameter | Description ||-----------|-------------||`filename`| Character string. Path to the HDF5 file. ||`group`| Character string. Group path to create (e.g., `"MGCCA_OUT/scores"`). |:::## Value::: {.return-value}List with components:- **`fn`**: Character string with the HDF5 filename- **`gr`**: Character string with the full group path created within the HDF5 file:::## DetailsIntermediate groups are created when needed. The HDF5 file mustexist prior to the call (create it with a writer function).## Examples```{r}#| eval: false#| code-fold: showlibrary(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 groupbdCreate_hdf5_group(fn, "MGCCA_OUT/scores")```## See Also::: {.see-also}[bdCreate_hdf5_matrix](bdCreate_hdf5_matrix.html), [bdRemove_hdf5_element](bdRemove_hdf5_element.html):::