h5Open {hdf5r.Extra} | R Documentation |
Open an HDF5 file, file-handler or group object
Description
Open an HDF5 file, file-handler or group object
Usage
h5Open(x, name, ...)
## S3 method for class 'H5Group'
h5Open(x, name, ...)
## S3 method for class 'H5File'
h5Open(x, name, ...)
## S3 method for class 'character'
h5Open(x, name, mode = c("a", "r", "r+", "w", "w-", "x"), ...)
Arguments
x |
|
name |
Name of the opened HDF5 link. |
... |
Arguments passed to #' @details
For an |
mode |
Passed to |
Value
An opened H5File
, H5Group
or H5D
.
When
x
is anH5File
or a file path,name = "/"
should always return anH5File
.When
x
is anH5Group
,name = "/"
should raise an error.
Examples
file <- system.file("extdata", "pbmc_small.h5ad", package = "hdf5r.Extra")
obs <- h5Open(file, "obs", mode = "r")
inherits(obs, "H5Group")
h5fh <- h5Open(file, "/", mode = "r")
inherits(h5fh, "H5File")
tsne <- h5Open(file, "obsm/tsne", mode = "r")
inherits(tsne, "H5D")
try(h5Open(obs, "/")) ## Error
[Package hdf5r.Extra version 0.1.0 Index]