| list_datasets | R Documentation |
Lists datasets within an HDF5 file. If no group is specified, the entire
file is traversed recursively and full relative paths are returned
(e.g. "INPUT/A", "RESULTS/SVD/d"). If a group is given,
only the datasets in that group are listed unless recursive = TRUE.
list_datasets(x, group = NULL, prefix = NULL, recursive = FALSE)
x |
An |
group |
Character or |
prefix |
Optional character. Only return datasets whose name starts with this prefix. |
recursive |
Logical. If |
Character vector of dataset names or relative paths.
hdf5_matrix, hdf5_create_matrix
fn <- tempfile(fileext = ".h5")
hdf5_create_matrix(fn, "INPUT/A", data = matrix(rnorm(100), 10, 10))
hdf5_create_matrix(fn, "INPUT/B", data = matrix(rnorm(100), 10, 10))
hdf5_create_matrix(fn, "RESULTS/C", data = matrix(rnorm(100), 10, 10))
# All datasets in the file (recursive from root)
list_datasets(fn)
# Only INPUT group
list_datasets(fn, group = "INPUT")
# From an HDF5Matrix object (uses object's own group)
X <- hdf5_matrix(fn, "INPUT/A")
list_datasets(X)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.