I have a hdf5 file with several attributes, each attribute is either a matrix or an array. I would like to modify some of the attributes by adding or removing a column to the matrix. How can this be done?
I have tried with the rhdf5 library in R but I can't seem to find the right functions. It seems I can only use write functions but I can't overwrite. I was thinking the only way might be to dump the whole file, modify and save as a new file.
This is a sample of my file
a=H5Fopen("S-1500-01-01-000000-g01.h5")
a
HDF5 FILE
name /
filename
name otype dclass dim
0 AGB_CO H5I_DATASET FLOAT 411
1 AGB_CUT H5I_DATASET FLOAT 17 x 11 x 1
2 AGB_GROWTH H5I_DATASET FLOAT 17 x 11 x 1
3 AGB_MORT H5I_DATASET FLOAT 17 x 11 x 1
4 AGB_PY H5I_DATASET FLOAT 17 x 11 x 1
5 AGB_SI H5I_DATASET FLOAT 17 x 11 x 1
6 AGE H5I_DATASET FLOAT 20
7 AGRI_STOCKING_DENSITY H5I_DATASET FLOAT 1
8 AGRI_STOCKING_PFT H5I_DATASET INTEGER 1