Learn R Programming

h5lite (version 2.0.0.2)

h5_attr_names: List HDF5 Attributes

Description

Lists the names of attributes attached to a specific HDF5 object.

Usage

h5_attr_names(file, name = "/")

Value

A character vector of attribute names.

Arguments

file

The path to the HDF5 file.

name

The path to the object (dataset or group) to query. Use / for the file's root attributes.

See Also

h5_ls()

Examples

Run this code
file <- tempfile(fileext = ".h5")

h5_write(1:10,          file, "data")
h5_write(I("meters"),   file, "data", attr = "unit")
h5_write(I(Sys.time()), file, "data", attr = "timestamp")

h5_attr_names(file, "data") # "unit" "timestamp"

unlink(file)

Run the code above in your browser using DataLab