HDF5 Identifier Interface {rhdf5} | R Documentation

## HDF5 Identifier Interface

### Description

These functions provides tools for working with object identifiers and object names.

### Usage

    H5Iget_type(h5identifier)
    H5Iget_name(h5obj)
    H5Iis_valid(h5identifier)

### Arguments

`h5identifier` | An object of class `H5IdComponent` representing a H5 identifier (file, group, dataset, dataspace, datatype, attribute). See e.g. `H5Fcreate`, `H5Fopen`, `H5Gcreate`, `H5Gopen`, `H5Dcreate`, `H5Dopen` to create an object of this kind.
`h5obj` | An object of class `H5IdComponent` representing a H5 object identifier (file, group, or dataset). See `H5Fcreate`, `H5Fopen`, `H5Gcreate`, `H5Gopen`, `H5Dcreate`, or `H5Dopen` to create an object of this kind.

### Details

Interface to the HDF5 C-library libhdf5. See https://portal.hdfgroup.org/display/HDF5/Identifiers for further details.

### Value

`H5Iget_type` returns the type of the H5 identifier, `H5Iget_name` the name of the object, and `H5Iis_valid` checks if the object is a valid H5 identifier.

### Author(s)

Bernd Fischer

### References

https://portal.hdfgroup.org/display/HDF5

### See Also

rhdf5

### Examples

    # create an hdf5 file and write something
    h5createFile("ex_H5I.h5")
    h5createGroup("ex_H5I.h5","foo")
    B = array(seq(0.1,2.0,by=0.1),dim=c(5,2,2))
    h5write(B, "ex_H5I.h5","foo/B")

    # reopen file and dataset and get object info
    fid <- H5Fopen("ex_H5I.h5")
    oid = H5Oopen(fid, "foo")
    H5Iget_type(oid)
    H5Oclose(oid)
    H5Fclose(fid)

[Package rhdf5 version 2.30.1 Index]