h5Exists {hdf5r.Extra}R Documentation

Check existence of an HDF5 link

Description

Check existence of an HDF5 link

Usage

h5Exists(x, name, ...)

## S3 method for class 'H5Group'
h5Exists(x, name, ...)

## S3 method for class 'H5File'
h5Exists(x, name, ...)

## S3 method for class 'character'
h5Exists(x, name, ...)

Arguments

x

An H5File, H5Group or a path name of HDF5 file

name

Name of HDF5 link to be checked.

...

Arguments passed to H5File$exists()

Value

If any parent directory of name doesn't exist, will simply return FALSE

Examples

file <- system.file("extdata", "pbmc_small.h5ad", package = "hdf5r.Extra")
h5Exists(file, "/")
h5Exists(file, "obs")
h5Exists(file, "X")

h5fh <- h5TryOpen(file, mode = "r")
h5Exists(h5fh, "obs")

h5obj <- h5Open(h5fh, "obs")
h5Exists(h5obj, "groups")


[Package hdf5r.Extra version 0.0.6 Index]