I am trying to load an hdf5 into R and running into some problems. Here are the steps I took to configure my environment:
- R 2.10.0 (x64) on Mac OS X 10.6
- hdf5 1.8.3 installed via macports
- hdf5_1.6.9.tar.gz from CRAN
I suspect the problem I am having relates to incompatibilities in my version of HDF5 and the one the R module expects. For completeness here is how I installed the R module:
R CMD INSTALL –configure-vars=’CPPFLAGS=-I/opt/local/include’ –configure-args=’–with-hdf5=/opt/local’ hdf5_1.6.9.tar.gz
This builds fine. The library seems to load without issue, but no data is returned when I try to load a file:
library(hdf5)
hdf5load(“test.h5”)
NULL
Yet,
osx:data scott$ h5dump test.h5
HDF5 “test.h5” {
GROUP “/” {
DATASET “dset” {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 31 ) / ( 31 ) }
DATA {
(0): 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192,
(14): 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152,
(22): 4194304, 8388608, 16777216, 33554432, 67108864, 134217728,
(28): 268435456, 536870912, 1073741824
}
}
}
}
Any thoughts?
Thanks in advance.
Use the
verbosityargument inhdfload()and check your environment usingls().hdfload()has a side effect, it loads the tables into the current environment,NULLis the default return value. If you use the argumentload=TRUEthe objects are returned as the components of a named list:load: A logical value. If ‘FALSE’,the objects are returned as the
components of a named list. If ‘TRUE’ (the default), the
objects are loaded as individual variables with their own
names – the function returns nothing in this case.
On my Mac everything works well with the same setup.