Contents

1 Motivation

Rhdf5lib provides the C and C++ HDF5 libraries. It is primarily useful to developers of other R packages who want to make use of the capabilities of the HDF5 library directly in the C or C++ code of their own packages, rather than using a higher level interface such as the rhdf5 package. Using Rhdf5lib make life easier for users, as they do not have to worry about installing libraries at a system level, and for developers since they can work with a defined version of the library rather than developing strategies to cope with the potential for multiple versions.

Rhdf5 is very much inspired by the zlibbioc and Rhtslib packages.

2 Usage

There is an example package, usingRhdf5lib, that demonstrates how packages should link to Rhdf5lib.

2.2 Locating the library headers

In order for the C/C++ compiler to find the HDF5 headers during package installation, add Rhtslib to the LinkingTo field of the DESCRIPTION file of your package, e.g.

LinkingTo: Rhtslib

In you C or C++ code files, you can then use the standard include techniques, e.g., #include "hdf5.h" or #include "c++/hdf5.h". C header files do not need a subfolder specified, while C++ headers are located under c++. You can inspect the header files manually to check their names and declared functions. To find their location on your system you can use the following code:

system.file(package="Rhdf5lib", "include")
## [1] "C:/Users/biocbuild/bbs-3.6-bioc/tmpdir/RtmpWwx91Y/Rinst11483c76462c/Rhdf5lib/include"

3 Funding

MLS was supported by the BMBF-funded Heidelberg Center for Human Bioinformatics (HD-HuB) within the German Network for Bioinformatics Infrastructure (de.NBI), Förderkennzeichen #031A537B

Session info

## R version 3.4.2 Patched (2017-10-07 r73498)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows Server 2012 R2 x64 (build 9600)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=C                          
## [2] LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] BiocStyle_2.6.0
## 
## loaded via a namespace (and not attached):
##  [1] compiler_3.4.2  backports_1.1.1 bookdown_0.5    magrittr_1.5   
##  [5] rprojroot_1.2   htmltools_0.3.6 tools_3.4.2     yaml_2.1.14    
##  [9] Rcpp_0.12.13    stringi_1.1.5   rmarkdown_1.6   knitr_1.17     
## [13] stringr_1.2.0   digest_0.6.12   evaluate_0.10.1