简体   繁体   English

R:使用rdhf5包从R读取.h5文件时出错

[英]R: error while reading .h5 files from R using rdhf5 package

I am new to hdf5 files. 我是hdf5文件的新手。 Trying to read some sample files from the below URL.. https://support.hdfgroup.org/ftp/HDF5/examples/files/exbyapi/ 尝试从下面的URL读取一些示例文件。https://support.hdfgroup.org/ftp/HDF5/examples/files/exbyapi/

while trying to reading one of the .h5 files in R environment 在尝试读取R环境中的.h5文件之一时

library(rhdf5) h5ls("h5ex_d_sofloat.h5")

I am getting the below error 我收到以下错误

Error in H5Fopen(file, "H5F_ACC_RDONLY") : HDF5. H5Fopen中的错误(文件“ H5F_ACC_RDONLY”):HDF5。 File accessability. 文件可访问性。 Unable to open file. 无法打开文件。

help is appreciated. 帮助表示赞赏。

There was some issues with windows itself which was encrypting the hdf5 file while downloading it with default arguments. Windows本身存在一些问题,正在使用默认参数下载该文件时对hdf5文件进行加密。 while downloading the just change the mode as "wb".. 在下载时只需将模式更改为“ wb”即可。

file_url <- "http://support.hdfgroup.org/ftp/HDF5/examples/files/exbyapi/h5ex_d_sofloat.h5"
library(rhdf5)
download.file(url = file_url,destfile = "h5ex_d_sofloat.binary.h5",mode = "wb")
h5ls("h5ex_d_sofloat.binary.h5")


>   group name       otype dclass     dim
0     /  DS1 H5I_DATASET  FLOAT 64 x 32

i got this solution from biocondutor itself... https://support.bioconductor.org/p/97311/#97362 我从biocondutor本身获得了此解决方案... https://support.bioconductor.org/p/97311/#97362

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM