h5_attr_names: List HDF5 Attributes

h5_attr_namesR Documentation

List HDF5 Attributes

Description

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

Usage

h5_attr_names(file, name = "/")

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.

Value

A character vector of attribute names.

See Also

h5_ls()

Examples

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)

h5lite documentation built on May 19, 2026, 1:07 a.m.