Delete an specified attribute of an HDF5 object
Arguments
- h5obj
An object of class H5IdComponent representing a H5 object identifier (file, group, or dataset). See
H5Fcreate(),H5Fopen(),H5Gcreate(),H5Gopen(),H5Dcreate(), orH5Dopen()to create an object of this kind.- name
The name of the attribute (character).
Examples
h5File <- tempfile(fileext = ".h5")
fid <- H5Fcreate(h5File)
sid <- H5Screate_simple(1)
aid <- H5Acreate(fid, "some_attribute", "H5T_NATIVE_INT", sid)
H5Aclose(aid)
H5Sclose(sid)
H5Aexists(fid, "some_attribute")
#> [1] TRUE
H5Adelete(fid, "some_attribute")
#> [1] 0
H5Aexists(fid, "some_attribute")
#> [1] FALSE
H5Fclose(fid)
file.remove(h5File)
#> [1] TRUE