hdf5.attributes {rhdf5}R Documentation

Attributes on HDF5 Objects.

Description

The HDF5 package provides the H5A library for the manipulation of attributes on HDF5 objects.

Usage

hdf5.attributes(set)
hdf5.attr(set, name)
hdf5.attr(set, name) <- value

Arguments

set An object of class hdf5.dataset.
name The name of an attribute (a character string).
value The value to associate with the attribute.

Details

Even though the HDF5 attributes look a lot like R attributes I do not believe that these functions should become generic. It would make little sense (and a lot of work) to try and syncronize HDF5 attributes and R attributes.

The HDF5 attributes do have the advantage that they are stored with the HDF5 datasets and groups and hence have persistence across R sessions.

Value

For hdf5.attributes a named list of attributes is returned. For hdf5.attr the value of the specific attribute is returned. For hdf5.attr<- the value is returned invisibly.

Note

The following excerpt is taken from the HDF5 online Reference:

The Attribute interface, H5A, is primarily designed to easily allow small datasets to be attached to primary datasets as metadata information. Additional goals for the H5A interface include keeping storage requirement for each attribute to a minimum and easily sharing attributes among datasets.

Because attributes are intended to be small objects, large datasets intended as additional information for a primary dataset should be stored as supplemental datasets in a group with the primary dataset. Attributes can then be attached to the group containing everything to indicate a particular type of dataset with supplemental datasets is located in the group. How small is "small" is not defined by the library and is up to the user's interpretation.

Author(s)

B. Ellis and R. Gentleman

References

http://hdf.ncsa.uiuc.edu/

See Also

hdf5.dataset, attr

Examples

 ## Not run: 
 mad <- hdf5.open("microarray.h5")
  hdf5.attributes(mad)
  hdf5.group(mad,"chip")
  hdf5.attr(mad$chip, "foo") <- 33
  hdf5.attributes(mad$chip)
  hdf5.attr(mad$chip, "foo")
  hdf5.attr(mad$chip, "bar") <- "aa"
  hdf5.attributes(mad$chip)
## End(Not run)

[Package rhdf5 version 1.4.0 Index]