I'm trying to create an HDF5 file using the `rhdf5` library. However, it seems that either I cannot create general attributes for the file, or there is some confusion about what I am doing, as `rhdf5` both can and cannot generate the attribute. Here is a minimal example:
tmp <- "tmp.hdf5" tmp <- H5Fcreate(tmp) h5writeAttribute(attr=matrix(1), h5obj=tmp, name="nchroms") h5readAttributes(tmp, "nchroms") Error in h5readAttributes(tmp, "nchroms") : Object nchroms does not exist in this HDF5 file. H5Aexists(tmp, "nchroms")  TRUE
What is going on here?
sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin16.3.0 (64-bit) Running under: macOS Sierra 10.12.3 locale:  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  rhdf5_2.18.0 loaded via a namespace (and not attached):  zlibbioc_1.20.0 compiler_3.3.2 tools_3.3.