[BioC] how to close a hdf5 file

Uday Maitra [guest] guest at bioconductor.org
Tue Apr 15 01:44:19 CEST 2014


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, 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"


 -- output of sessionInfo(): 

R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] compiler  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rhdf5_2.6.0             RcppRoll_0.1.0          RcppArmadillo_0.4.200.0 Rcpp_0.11.1            
[5] data.table_1.9.2       

loaded via a namespace (and not attached):
[1] plyr_1.8.1     reshape2_1.2.2 stringr_0.6.2  tools_3.0.3    zlibbioc_1.8.0


--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list