HDF5 Attribute Interface
These functions create and manipulate attributes and information about attributes.
H5Acreate       (h5obj, name, dtype_id, h5space)
H5Aclose        (h5attribute)
H5Adelete       (h5obj, name)
H5Aexists       (h5obj, name)
H5Aget_name     (h5attribute)
H5Aget_space    (h5attribute)
H5Aget_type     (h5attribute)
H5Aopen         (h5obj, name)
H5Aopen_by_idx  (h5obj, n, objname = ".", index_type = h5default("H5_INDEX"), 
                 order = h5default("H5_ITER"))
H5Aopen_by_name (h5obj, objname = ".", name)
H5Aread         (h5attribute, buf = NULL)
H5Awrite        (h5attribute, buf)h5obj | 
 An object of class   | 
name | 
 The name of the attribute (character).  | 
dtype_id | 
 A character name of a datatype. See   | 
h5space | 
 An object of class   | 
h5attribute | 
 An object of class   | 
n | 
 Opens attribute number n in the given order and index. The first attribute is opened with n=0.  | 
objname | 
 The name of the object the attribute belongs to.  | 
index_type | 
 See   | 
order | 
 See   | 
buf | 
 Reading and writing buffer containing the data to written/read. When using the buffer for reading, the buffer size has to fit the size of the memory space   | 
Interface to the HDF5 C-library libhdf5. See https://portal.hdfgroup.org/display/HDF5/Attributes for further details.
H5Acreate, H5Aopen, H5Aopen_by_name, H5Aopen_by_idx  return an object of class H5IdComponent representing a H5 attribute identifier.
H5Aget_space returns an object of class H5IdComponent representing a H5 dataspace identifier.
H5Aread returns an array with the read data.
The other functions return the standard return value from their respective C-functions.
Bernd Fischer
# create a file and write something
h5createFile("ex_H5A.h5")
h5write(1:15, "ex_H5A.h5","A")
# write an attribute 'unit' to 'A'
fid <- H5Fopen("ex_H5A.h5")
did <- H5Dopen(fid, "A")
sid <- H5Screate_simple(c(1,1))
tid <- H5Tcopy("H5T_C_S1")
H5Tset_size(tid, 10L)
aid <- H5Acreate(did, "unit", tid, sid)
aid
H5Awrite(aid, "liter")
H5Aclose(aid)
H5Sclose(sid)
H5Aexists(did, "unit")
H5Dclose(did)
H5Fclose(fid)
h5dump("ex_H5A.h5")Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.