1
filename <- h5file("file.h5" , 'r')

filename

H5File 'file.h5' (mode 'r')
 + XYZ

filename["/XYZ/"]

There are few groups inside "XYZ" and then datasets inside them. Group names vary from file to file.

Format : "XYZ/.../../abc/def/". These are the groups inside each file where "..." are the group names that are not same and XYZ,abc,def are same in every file.

I tried filename["/XYZ/* "], but this is not working. Is there any other way to access groups inside XYZ.

h5ls() doesn't seems to work because I have 1000's of files with 100's of datasets inside each file and when I loop them with h5ls() inside the loop, it takes hours to get the result. I even tried h5file() followed by list.datasets(), but again time is a problem.

Can I access the datasets inside the files without actually opening them?

Shriram
  • 11
  • 2
  • `h5ls("C:/folder/file.h5")` this lists all the groups. Then you can use `mdf5<- h5read("C:/folder/file.h5", "/mygroup/mydata")` – M-- Jul 06 '17 at 17:18
  • file.data <- h5ls(...). Here size of file.data is around 30kb. I have 1000's of such files, and i can't use this in a loop for this big number. – Shriram Jul 06 '17 at 17:40
  • Yes you can, question is how? Edit your question, include more details that says you have so many files, refer to the solution provided above (`h5ls(...)`) and ask how to loop through the list of files and get groups or read all the groups. I will vote to reopen your question then. – M-- Jul 06 '17 at 17:52

0 Answers0