---title: "bdWrite_hdf5_dimnames"subtitle: "bdWrite_hdf5_dimnames"---<span class="category-badge hdf5_io_management">HDF5_IO_MANAGEMENT</span>## DescriptionWrite row and/or column names metadata for an existing dataset in anHDF5 file. Empty vectors skip the corresponding dimnames.## Usage```rbdWrite_hdf5_dimnames(filename, group, dataset, rownames, colnames)```## Arguments::: {.param-table}| Parameter | Description ||-----------|-------------||`filename`| Character string. Path to the HDF5 file. ||`group`| Character string. Group containing the dataset. ||`dataset`| Character string. Dataset name inside \code{group}. ||`rownames`| Character vector of row names. Use \code{character(0)} to skip writing row names. If provided, length must equal nrow. ||`colnames`| Character vector of column names. Use \code{character(0)} to skip writing column names. If provided, length must equal ncol. |:::## Value::: {.return-value}List with components. If an error occurs, all string values are returned as empty strings (""):- **`fn`**: Character string with the HDF5 filename- **`dsrows`**: Character string with the full dataset path to the row names, stored as ".\code{dataset- **`dscols`**: Character string with the full dataset path to the column names, stored as ".\code{dataset:::## DetailsThe dataset `group/dataset` must already exist. When non-empty,`rownames` and `colnames` lengths are validated against thedataset dimensions.## Examples```{r}#| eval: false#| code-fold: showbdWrite_hdf5_dimnames(filename ="test.h5",group ="MGCCA_IN",dataset ="X",rownames =paste0("r", seq_len(100)),colnames =paste0("c", seq_len(50)))# Skip column names:bdWrite_hdf5_dimnames("test.h5", "MGCCA_IN", "X",rownames =paste0("r", 1:100),colnames =character(0))```