h5Open | R Documentation |
Open an HDF5 file, file-handler or group object
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"), ...)
x |
An |
name |
Name of the opened HDF5 link. |
... |
Arguments passed to #' @details
For an |
mode |
Passed to |
An opened H5File
, H5Group
or H5D
.
When x
is an H5File
or a file path,
name = "/"
should always return an H5File
.
When x
is an H5Group
, name = "/"
should raise an error.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.