Contents

1 Overview

Rigraphlib builds the igraph static library for use in R/Bioconductor packages. This is primarily intended for R packages that wrap other C/C++ libraries that depend on the igraph C library and cannot easily be modified to use the usual igraph R package. By vendoring in the source code, we also reduce our susceptibility to out-of-release-schedule changes in results due to igraph updates. This also allows developers to access functionality that might yet not be available from the R bindings.

Currently, this package contains version 0.10.15 of the C igraph library.

2 Quick start

Downstream package developers can use Rigraphlib by adding:

Imports: Rigraphlib

to their package DESCRIPTION, and setting:

RIGRAPH_FLAGS=$(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e 'Rigraphlib::pkgconfig("PKG_CPPFLAGS")')
PKG_CPPFLAGS=$(RIGRAPH_FLAGS)
RIGRAPH_LIBS=$(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e 'Rigraphlib::pkgconfig("PKG_LIBS")')
PKG_LIBS=$(RIGRAPH_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) 

in their src/Makevars. We use R’s own BLAS and LAPACK libraries to avoid redundant recompilation of igraph’s vendored copies.

Session information

sessionInfo()
## R Under development (unstable) (2025-03-02 r87868)
## Platform: aarch64-apple-darwin20
## Running under: macOS Ventura 13.7.1
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
## 
## locale:
## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/New_York
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] knitr_1.49       BiocStyle_2.35.0
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.37       R6_2.6.1            bookdown_0.42      
##  [4] fastmap_1.2.0       xfun_0.51           cachem_1.1.0       
##  [7] htmltools_0.5.8.1   rmarkdown_2.29      lifecycle_1.0.4    
## [10] cli_3.6.4           sass_0.4.9          jquerylib_0.1.4    
## [13] compiler_4.5.0      tools_4.5.0         evaluate_1.0.3     
## [16] bslib_0.9.0         yaml_2.3.10         BiocManager_1.30.25
## [19] jsonlite_1.9.1      rlang_1.1.5