Last chance! 50% off unlimited learning
Sale ends in
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)
h5const("H5T")
for possible datatypes. Can also be an integer representing an HDF5 datatype. Only simple datatypes are allowed for atttributes.H5IdComponent
representing a H5 dataspace. See H5Dget_space
, H5Screate_simple
, H5Screate
to create an object of this kind.H5IdComponent
represnting a H5 attribute as created by H5Acreate
or H5Aopen
h5const("H5_INDEX")
for possible arguments.h5const("H5_ITER")
for possible arguments.h5spaceMem
. No extra memory will be allocated for the data. A pointer to the same data is returned.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.
# 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")
Run the code above in your browser using DataLab