Learn R Programming

h5 (version 0.9.9)

Attribute: The Attribute Class

Description

An HDF5 Attribute object is used to store meta data about a primary data object like DataSet, H5Group or H5File. The functions described in this section show a low--level interface to read and write attributes. See H5Location for the easier-to-use h5attr convenience functions.

Usage

writeAttribute(.Object, data = GetDimensions(data), transpose = TRUE)

# S4 method for Attribute writeAttribute(.Object, data = GetDimensions(data), transpose = TRUE)

readAttribute(.Object)

# S4 method for Attribute readAttribute(.Object)

Arguments

.Object

Attribute; S4 object of class Attribute.

data

object; Object to be stored in HDF5 file, can be either of type vector, matrix or array.

transpose

logical; Determine if data object should be transposed.

Details

Attributes are assumed to be like small DataSets since they can store the same data types in homogeneous objects like vectors, matrices and arrays. However, there are two important differences compared to DataSet objects:

  1. Attributes do not support compression or chunking.

  2. Subsetting is not possible for attribute data.

References

http://www.hdfgroup.org/HDF5/doc/H5.intro.html#Intro-OAttributes

See Also

H5Location-Attribute