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, through the
ropenblas() function, to use the OpenBLAS library. Everything will be done automatically regardless of the Linux distribution you are using.
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.
The ropenblas package, by
rcompiler() function is also useful if you want to install different versions of the R language. The different versions, specified by the user of the R language, will be compiled and will also be linked to the OpenBLAS library. If you want to switch between compiled versions of the R language, no compilation is needed anymore. This allows you to avoid having to get your hands dirty with tedious operating system settings, regardless of your GNU/Linux distribution. Another great use of the
rcompiler() function is that you will not be dependent on updating your GNU/Linux distribution repositories and you can always have the latest version of the R language.
The use of the ropenblas package will return warnings that help you proceed with the use of the functions. If your internet is not working or if any dependency on the operating system is not present, the package will let you know.
Some advantages of using the ropenblas library:
Everything is done within the R language;
The procedure will be the same for any 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;
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;
You must install the following dependencies on your operating system (Linux):
1 - GNU Make: GNU Make utility to maintain groups of programs;
2 - GNU GCC Compiler (C and Fortran): The GNU Compiler Collection - C and Fortran frontends.
Do not worry that you will be notified if any of these dependencies are not installed.
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:
::install_github(repo = "prdm0/ropenblas", force = TRUE)remotes
Given the higher version, the function will return the latest stable version of the R language. See the following example:
This function is responsible for compiling a version of the R language. The
x argument is the version of R that you want to compile. For example,
x = "4.0.4" will compile and link R-4.0.4 version as the major version on your system. By default (
x = NULL) will be compiled the latest stable version of the R.
For example, to compile the latest stable version of the R language, do:
You can use the
rcompiler() function to compile different versions of R. For example, running
rcompiler(x = "3.6.3") and
rcompiler() will install versions 3.6.3 and 4.0.0 on its GNU/Linux distribution, respectively. If you are in version 4.0.0 of R and run the code
rcompiler(x = "3.6.3") again, the function will identify the existence of version 3.6.3 in the system and give you the option to use the binaries that were built in a previous compilation. This avoids unnecessarys compilations.
Returns the contents of the NEWS.html file in the standard browser installed on the operating system. The NEWS.html file contains the main changes from the recently released versions of the R language. The goal is to facilitate the query by invoking it directly from the R command prompt. The rnews function is analogous to the news function of the utils package. However, using the news command in a terminal style bash shell is possible to receive a message like:
> news() starting httpd help server ... donein browseURL(url) : 'browser' must be a non-empty character stringError
pdf = FALSE (default), the NEWS.html file will open in the browser, otherwise NEWS.pdf will be opened. If
dev = FALSE (default), it will not show changes made to the language development version. To see changes in the development version, do
dev = TRUE.