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

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

我是 hdf5 文件的新手。尝试从下面 URL 读取一些示例文件。 https://support.hdfgroup.org/ftp/HDF5/examples/files/exbyapi/

尝试在 R 环境中读取其中一个 .h5 文件时

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

我收到以下错误

Error in H5Fopen(file, "H5F_ACC_RDONLY") : HDF5. File accessability. Unable to open file.

感谢帮助。

windows 本身存在一些问题,它在使用默认参数下载 hdf5 文件时对其进行加密。下载时只需将模式更改为 "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

我从 biocondutor 本身得到了这个解决方案...... https://support.bioconductor.org/p/97311/#97362