| bdWrite_hdf5_dimnames | R Documentation |
Write row and/or column names metadata for an existing dataset in an HDF5 file. Empty vectors skip the corresponding dimnames.
bdWrite_hdf5_dimnames(filename, group, dataset, rownames, colnames)
filename |
Character string. Path to the HDF5 file. |
group |
Character string. Group containing the dataset. |
dataset |
Character string. Dataset name inside |
rownames |
Character vector of row names. Use |
colnames |
Character vector of column names. Use
|
The dataset group/dataset must already exist. When non-empty,
rownames and colnames lengths are validated against the
dataset dimensions.
List with components. If an error occurs, all string values are returned as empty strings (""):
Character string with the HDF5 filename
Character string with the full dataset path to the row names,
stored as ".dataset_dimnames/1" within the specified group
Character string with the full dataset path to the column
names, stored as ".dataset_dimnames/2" within the specified group
fn <- tempfile(fileext = ".h5")
hdf5_create_matrix(fn, "MGCCA_IN/X",
data = matrix(rnorm(5000), 100, 50))
bdWrite_hdf5_dimnames(
filename = fn,
group = "MGCCA_IN",
dataset = "X",
rownames = paste0("r", seq_len(100)),
colnames = paste0("c", seq_len(50))
)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.