| bdgetDatasetsList_hdf5 | R Documentation |
Retrieves a list of all datasets within a specified HDF5 group, with optional filtering by prefix or suffix.
bdgetDatasetsList_hdf5(
filename,
group = NULL,
prefix = NULL,
recursive = FALSE
)
filename |
Character string. Path to the HDF5 file. |
group |
Character string or |
prefix |
Optional character string. Only return datasets whose name starts with this prefix. |
recursive |
Logical. If |
This function provides flexible dataset listing capabilities for HDF5 files. Key features:
Listing options:
All datasets in a group
Datasets matching a prefix
Datasets matching a suffix
Implementation features:
Safe HDF5 file operations
Memory-efficient implementation
Comprehensive error handling
Read-only access to files
The function opens the HDF5 file in read-only mode to ensure data safety.
Character vector containing dataset names.
The HDF Group. (2000-2010). HDF5 User's Guide.
fn <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(fn, "INPUT/A", data = matrix(rnorm(100), 10, 10))
Y <- hdf5_create_matrix(fn, "INPUT/B", data = matrix(rnorm(100), 10, 10))
Z <- hdf5_create_matrix(fn, "RESULTS/C",data = matrix(rnorm(100), 10, 10))
# All datasets in the file (recursive from root)
bdgetDatasetsList_hdf5(fn)
# Only datasets in INPUT group
bdgetDatasetsList_hdf5(fn, group = "INPUT")
# INPUT group, recursive (same result here, no subgroups)
bdgetDatasetsList_hdf5(fn, group = "INPUT", recursive = TRUE)
# Filter by prefix
bdgetDatasetsList_hdf5(fn, group = "INPUT", prefix = "A")
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.