ropenblas v0.1.0


Monthly downloads



Download, Compile and Link 'OpenBLAS' Library with R

The 'ropenblas' package (<>) is useful for users of any 'GNU/Linux' distribution. It will be possible to download, compile and link the 'OpenBLAS' library (<>) with the \R language, always by the same procedure, regardless of the 'GNU/Linux' distribution used. With the 'ropenblas' package it is possible to download, compile and link the latest version of the 'OpenBLAS' library (<>) even the repositories of the 'GNU/Linux' distribution used do not include the latest versions of 'OpenBLAS' (<>). If of interest, older versions of the 'OpenBLAS' library (<>) may be considered. Linking \R with an optimized version of 'BLAS' (<>) may improve the computational performance of \R code. The 'OpenBLAS' library (<>) is an optimized implementation of 'BLAS' (<>) that can be easily linked to \R with the 'ropenblas' package.


ropenblas package

The ropenblas is a package designed to facilitate the linking of the library OpenBLAS with the language R. The package, which works only for Linux systems, will automatically download the latest source code from the OpenBLAS library and compile the code. The package will automatically bind the language R to use the OpenBLAS library. Everything will be done automatically regardless of the Linux distribution you are using.

You can also specify older versions of the OpenBLAS library. Automatically, if no version is specified, the ropenblas package will consider the latest version of the library OpenBLAS.

Considering using the OpenBLAS library rather than the BLAS may bring extra optimizations for your code and improved computational performance for your simulations, since OpenBLAS is an optimized implementation of the library BLAS.

Some of the reasons why it is convenient to link R language to the use of BLAS optimized alternatives can be found here. Several other benchmarks that point to improved computing performance by considering the library OpenBLAS can be found on the internet.


You must install the following dependencies on your operating system (Linux):

1 - make: GNU make utility to maintain groups of programs;

2 - gcc: The GNU Compiler Collection - C and C++ frontends;

3 - gcc-fortran: The GNU Compiler Collection - Fortran frontends.


Installing the ropenblas library is easy and will require you to have installed the devtools package. This will allow you to install the ropenblas package directly from GitHub. To install, after installing the devtools package, do:

devtools::install_github(repo = "prdm0/ropenblas", force = TRUE)


Installing, compiling, and linking the OpenBLAS version 0.3.7 library to the R language:

ropenblas(x = "0.3.7")


  • You do not have to in every section of R make use of the ropenblas() function. Once the function is used, R will always consider using the OpenBLAS library in future sections.

  • OpenBLAS versions tested: 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6 and 0.3.7. These are the values that will be passed to x in ropenblas(x).


Your linux operating system may already be configured to use the OpenBLAS library. Therefore, most likely R will already be linked to this library. To find out if the R language is using the OpenBLAS library, at R, do:


If R is using the OpenBLAS library, something like /any_directory/ should be returned. Therefore, there should be the name openblas in the shared object returned (file extension .so).

If the ropenblas() function can identify that the R language is using the version of OpenBLAS you wish to configure, a warning message will be returned asking if you really would like to proceed with the configuration again.

The ropenblas() function will download the desired version of the library OpenBLAS, compile and install the library in the /opt directory of your operational system. If the directory does not exist, it will be created so that the installation can be completed. Subsequently, files from the version of BLAS used in R will be symbolically linked to the shared object files of the library version OpenBLAS compiled and installed in /opt.

You must be the operating system administrator to use this library. Therefore, do not attempt to use it without telling your system administrator. If you have the ROOT password, you will be responsible for everything you do on your operating system.


Some advantages of using the ropenblas library:

  • Everything is done within the R language;

  • The procedure will be the same for any Linux distribution;

  • The OpenBLAS library will be compiled and you will choose which build version to bind to R, regardless of your Linux distribution;

  • If your GNU/Linux distribution does not have updated versions of OpenBLAS, it matters little. The ropenblas package fetches the latest stable release of the OpenBLAS library development account on GitHub;

  • You do not need to know Linux well. In some distributions, it may not be so simple for a less experienced user to compile and link the library to the OpenBLAS library with the R language;

  • It is much easier to direct a person to link OpenBLAS with R saying "run ropenblas() within R" than asking that person to verify that an unoptimized version of BLAS installed on the system. Then you have to guide the removal of the unoptimized version of BLAS and guide it to the installation of the library OpenBLAS through the most diverse procedures depending on the GNU/Linux distribution used;

  • As stated earlier, the procedure works for any Linux and this includes Android. If your Android is capable of running privileged commands (ROOT) and if you have R installed via Termux with the required dependencies, you can compile and link OpenBLAS with R using ropenblas.

Functions in ropenblas

Name Description
ropenblas Download, Compile and Link OpenBLAS Library with R
No Results!

Last month downloads


Type Package
URL (GitHub Project)
SystemRequirements make, gcc compiler suite (C and Fortran)
License GPL-3
Encoding UTF-8
LazyData true
RoxygenNote 7.0.0
NeedsCompilation no
Packaged 2019-11-28 16:44:15 UTC; pedro
Repository CRAN
Date/Publication 2019-12-02 15:30:02 UTC

Include our badge in your README