H5Dopen: Open an existing HDF5 dataset

View source: R/H5D.R

H5DopenR Documentation

Open an existing HDF5 dataset

Description

Open an existing HDF5 dataset

Usage

H5Dopen(h5loc, name, dapl = NULL)

Arguments

h5loc

An object of class H5IdComponent representing a H5 location identifier (file or group).

name

Name of the dataset to open.

dapl

An object of class H5IdComponent representing a H5 dataset access property list.

Value

An object of class H5IdComponent representing the opened dataset. To prevent memory leaks this must be closed with a call to H5Dclose() when no longer needed.

Examples

h5file <- tempfile(fileext = ".h5")
h5createFile( h5file )
h5createDataset( h5file, dataset = "A", dims = 10)

fid <- H5Fopen( h5file )
did <- H5Dopen( h5loc = fid, name = "A")
did

## rember to close open handles
H5Dclose( did )
H5Fclose( fid )


grimbough/rhdf5 documentation built on Dec. 9, 2024, 8:40 p.m.