I have created a dummy HDF5 object as
libray(rhdf5)
handle = h5createFile("rhd5file.h5")
df_A <- data.frame(height = rnorm(20,55,3), index = c(1:20))
df_B <- data.frame(age = rnorm(10,30,5), address = sample(letters,size= 10,replace = TRUE))
h5write(df_A, "rhd5file.h5", "A")
h5write(df_B, "rhd5file.h5", "B")
h5close(handle)
Now, I want to retrieve only column names of objects df_A and df_B without reading the entire file rhd5file.h5. Is it possible?
I tried h5readAttributes() and h5ls(), but none of them shows column names without reading entire object
Required output:
A: height, index
B: age, address