I have an hdf5 file containing the following dataset:
DATASET "data" {
DATATYPE H5T_COMPOUND {
H5T_STD_U16LE "rlzi";
H5T_STD_U32LE "sid";
H5T_STD_U64LE "eid";
H5T_ARRAY { [2] H5T_IEEE_F32LE } "gmv";
}
DATASPACE SIMPLE { ( 39838472 ) / ( H5S_UNLIMITED ) }
ATTRIBUTE "nbytes" {
DATATYPE H5T_STD_I64LE
DATASPACE SCALAR
}
}
Each record has an array "gmv" with two elements. I can read this dataset with the hdf5r package using the following code:
library(hdf5r)
fl <- h5file("file.hdf5", mode="r")
ds <- fl$open("/groupname/data")
dat <- ds$read()
Using this only reads one of the two "gmv" elements, to give a dataframe with the following structure:
'data.frame': 39838472 obs. of 4 variables:
$ rlzi: int 26 11 13 14 1 2 5 14 14 11 ...
$ sid : int 11 16 18 18 33 33 37 40 41 42 ...
$ eid :integer64 322350180466688 322350180466688 322350180466688 ...
$ gmv : num 0 0 0 0 0 0 0 0 0 0 ...
Is there any way I can read both elements of the gmv array for each record?