问题
I am using the rhdf5
library to create HDF5 files.
h5createFile(myHDF5FileName)
h5createDataset(myHDF5FileName,"myData",storage.mode="double",level=9,dims=length(myData), chunk=10000)
h5write(myData,myHDF5FileName,"myData")
Works fine, except that when I tried to delete the physical file Windows 7 tells me that the file is still open in RStudio
, i.e. the file handle seems to be open in my RStudio
environment. I checked the rhdf5
documents - http://www.bioconductor.org/packages/release/bioc/vignettes/rhdf5/inst/doc/rhdf5.pdf and
http://www.bioconductor.org/packages/devel/bioc/manuals/rhdf5/man/rhdf5.pdf
but I couldn't find any function to close the hdf5 connection.
The manual seems to indicate that there is a H5Fopen
and H5Fclose
function and I tried them too, but I still cannot delete the physical file UNLESS I quit RStudio
.
There is another function H5close()
, but when I tried that I get an error Error: could not find function "H5close"
来源:https://stackoverflow.com/questions/23072210/how-to-close-a-hdf5-file